blob: 946329c24ac7be2e8d56e97dc8d4939ac570c8b3 (
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
|
<script lang="ts">
import { onDestroy } from 'svelte';
let show = false;
const timeout = setTimeout(() => (show = true), 150);
onDestroy(() => clearTimeout(timeout));
</script>
{#if show}
<div class="flex h-full w-full items-center justify-center">
<span class="spinner" />
</div>
{/if}
<style lang="postcss">
.spinner {
width: 64px;
height: 64px;
border: 5px solid theme(colors.gray.200);
border-bottom-color: transparent;
border-radius: 50%;
display: inline-block;
box-sizing: border-box;
animation: rotation 1s linear infinite;
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
|