2017-05-10 15:52:09 +00:00
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
label: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: 'Loading',
|
|
|
|
},
|
|
|
|
|
|
|
|
size: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '1',
|
|
|
|
},
|
2017-06-27 17:38:07 +00:00
|
|
|
|
|
|
|
inline: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
2017-05-10 15:52:09 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2017-06-27 17:38:07 +00:00
|
|
|
rootElementType() {
|
|
|
|
return this.inline ? 'span' : 'div';
|
|
|
|
},
|
2017-05-10 15:52:09 +00:00
|
|
|
cssClass() {
|
2017-10-30 19:53:14 +00:00
|
|
|
return `fa-${this.size}x`;
|
2017-05-10 15:52:09 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2017-06-27 17:38:07 +00:00
|
|
|
<component
|
|
|
|
:is="this.rootElementType"
|
|
|
|
class="text-center">
|
2017-05-10 15:52:09 +00:00
|
|
|
<i
|
|
|
|
class="fa fa-spin fa-spinner"
|
|
|
|
:class="cssClass"
|
|
|
|
aria-hidden="true"
|
|
|
|
:aria-label="label">
|
|
|
|
</i>
|
2017-06-27 17:38:07 +00:00
|
|
|
</component>
|
2017-05-10 15:52:09 +00:00
|
|
|
</template>
|