summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/components/Spinner.svelte
blob: d85c4f47f5cb83bb57f88f7741f663efd2347307 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script lang="ts">
	import { onDestroy } from 'svelte';

	let show = $state(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="h-16 w-16 animate-spin rounded-full border-4 border-white/80 border-b-transparent"
		></span>
	</div>
{/if}