aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/loading/CubeShadow.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/site/components/loading/CubeShadow.vue')
-rw-r--r--src/site/components/loading/CubeShadow.vue49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/site/components/loading/CubeShadow.vue b/src/site/components/loading/CubeShadow.vue
new file mode 100644
index 0000000..7aeed65
--- /dev/null
+++ b/src/site/components/loading/CubeShadow.vue
@@ -0,0 +1,49 @@
+<template>
+ <div
+ :style="styles"
+ class="spinner spinner--cube-shadow" />
+</template>
+
+<script>
+export default {
+ props: {
+ size: {
+ 'type': String,
+ 'default': '60px'
+ },
+ background: {
+ 'type': String,
+ 'default': '#9C27B0'
+ },
+ duration: {
+ 'type': String,
+ 'default': '1.8s'
+ }
+ },
+ computed: {
+ styles() {
+ return {
+ width: this.size,
+ height: this.size,
+ backgroundColor: this.background,
+ animationDuration: this.duration
+ };
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+ .spinner{
+ animation: cube-shadow-spinner 1.8s cubic-bezier(0.75, 0, 0.5, 1) infinite;
+ }
+ @keyframes cube-shadow-spinner {
+ 50% {
+ border-radius: 50%;
+ transform: scale(0.5) rotate(360deg);
+ }
+ 100% {
+ transform: scale(1) rotate(720deg);
+ }
+ }
+</style>