Backport inline loading_icon updates from EE
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2246#note_33577729
This commit is contained in:
parent
b7ea3ce467
commit
236b921bd6
1 changed files with 13 additions and 2 deletions
|
@ -12,9 +12,18 @@
|
|||
required: false,
|
||||
default: '1',
|
||||
},
|
||||
|
||||
inline: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
rootElementType() {
|
||||
return this.inline ? 'span' : 'div';
|
||||
},
|
||||
cssClass() {
|
||||
return `fa-${this.size}x`;
|
||||
},
|
||||
|
@ -22,12 +31,14 @@
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<component
|
||||
:is="this.rootElementType"
|
||||
class="text-center">
|
||||
<i
|
||||
class="fa fa-spin fa-spinner"
|
||||
:class="cssClass"
|
||||
aria-hidden="true"
|
||||
:aria-label="label">
|
||||
</i>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue