aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Home/Root.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-28 15:32:46 -0700
committerFuwn <[email protected]>2024-10-28 15:32:46 -0700
commit39b677404558ae3b7eb34e818d7ca308f62f9cb0 (patch)
tree7f19fca39ecd4237e3c0d1aef2d8e9fa3cec7845 /src/lib/Home/Root.svelte
parentfeat(graphql): paged badges query (diff)
downloaddue.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.svelte13
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}