Commit 236b921b authored by Eric Eastwood's avatar Eric Eastwood

Backport inline loading_icon updates from EE

See
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2246#note_33577729
parent b7ea3ce4
...@@ -12,9 +12,18 @@ ...@@ -12,9 +12,18 @@
required: false, required: false,
default: '1', default: '1',
}, },
inline: {
type: Boolean,
required: false,
default: false,
},
}, },
computed: { computed: {
rootElementType() {
return this.inline ? 'span' : 'div';
},
cssClass() { cssClass() {
return `fa-${this.size}x`; return `fa-${this.size}x`;
}, },
...@@ -22,12 +31,14 @@ ...@@ -22,12 +31,14 @@
}; };
</script> </script>
<template> <template>
<div class="text-center"> <component
:is="this.rootElementType"
class="text-center">
<i <i
class="fa fa-spin fa-spinner" class="fa fa-spin fa-spinner"
:class="cssClass" :class="cssClass"
aria-hidden="true" aria-hidden="true"
:aria-label="label"> :aria-label="label">
</i> </i>
</div> </component>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment