aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/loading/CubeShadow.vue
blob: 7aeed65f6fefa25a6e10a82d9b6cd359634cf91b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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>