diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-07 19:46:53 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-07 19:46:53 +0300 |
commit | 4fac95a64d0c04599af9c762edb94414d85bf42f (patch) | |
tree | b87775aff426603984bc547208860ad147fcff69 /app/assets/javascripts/vue_shared | |
parent | 02878cd958557128cd9c22b27bd2fb97a843266b (diff) | |
parent | 396f45ade1dddec36df9861f8a1bb80aabd2ff15 (diff) |
Merge branch 'master' into 38464-k8s-apps
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue b/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue new file mode 100644 index 00000000000..b06493e6c66 --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue @@ -0,0 +1,37 @@ +<script> + export default { + props: { + small: { + type: Boolean, + required: false, + default: false, + }, + lines: { + type: Number, + required: false, + default: 6, + }, + }, + computed: { + lineClasses() { + return new Array(this.lines).fill().map((_, i) => `skeleton-line-${i + 1}`); + }, + }, + }; +</script> + +<template> + <div + class="animation-container" + :class="{ + 'animation-container-small': small, + }" + > + <div + v-for="(css, index) in lineClasses" + :key="index" + :class="css" + > + </div> + </div> +</template> |