add transition
This commit is contained in:
10
src/lib/components/transition/Transition.svelte
Normal file
10
src/lib/components/transition/Transition.svelte
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import { router } from 'tinro';
|
||||
import { fade } from 'svelte/transition';
|
||||
</script>
|
||||
|
||||
{#key $router.path}
|
||||
<div in:fade={{ duration: 700 }} class="h-full w-full">
|
||||
<slot />
|
||||
</div>
|
||||
{/key}
|
||||
Reference in New Issue
Block a user