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