diff options
| author | Fuwn <[email protected]> | 2024-10-28 15:32:46 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-28 15:32:46 -0700 |
| commit | 39b677404558ae3b7eb34e818d7ca308f62f9cb0 (patch) | |
| tree | 7f19fca39ecd4237e3c0d1aef2d8e9fa3cec7845 /src/lib/Home/Root.svelte | |
| parent | feat(graphql): paged badges query (diff) | |
| download | due.moe-svelte-5.tar.xz due.moe-svelte-5.zip | |
feat: update to svelte 5svelte-5
Diffstat (limited to 'src/lib/Home/Root.svelte')
| -rw-r--r-- | src/lib/Home/Root.svelte | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/Home/Root.svelte b/src/lib/Home/Root.svelte index bc1bdea9..e17f9a77 100644 --- a/src/lib/Home/Root.svelte +++ b/src/lib/Home/Root.svelte @@ -2,14 +2,19 @@ import settings from '$stores/settings'; import { fly } from 'svelte/transition'; - export let data: any; - export let way: number; + interface Props { + data: any; + way: number; + children?: import('svelte').Snippet; + } + + let { data, way, children }: Props = $props(); const animationDelay = 100; </script> {#if $settings.displayDisableAnimations} - <slot /> + {@render children?.()} {:else} {#key data.url} <div @@ -20,7 +25,7 @@ }} out:fly={{ x: -way, duration: animationDelay }} > - <slot /> + {@render children?.()} </div> {/key} {/if} |