2017-09-10 17:25:29 +05:30
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
label: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: 'Loading',
|
|
|
|
},
|
|
|
|
|
|
|
|
size: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '1',
|
|
|
|
},
|
|
|
|
|
|
|
|
inline: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
rootElementType() {
|
|
|
|
return this.inline ? 'span' : 'div';
|
|
|
|
},
|
|
|
|
cssClass() {
|
|
|
|
return `fa-${this.size}x`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<component
|
2018-03-17 18:26:18 +05:30
|
|
|
:is="rootElementType"
|
|
|
|
class="loading-container text-center">
|
2017-09-10 17:25:29 +05:30
|
|
|
<i
|
|
|
|
:class="cssClass"
|
2018-03-17 18:26:18 +05:30
|
|
|
:aria-label="label"
|
2018-11-08 19:23:39 +05:30
|
|
|
class="fa fa-spin fa-spinner"
|
|
|
|
aria-hidden="true"
|
2018-03-17 18:26:18 +05:30
|
|
|
>
|
2017-09-10 17:25:29 +05:30
|
|
|
</i>
|
|
|
|
</component>
|
|
|
|
</template>
|