webcompile/src/lib/PageTransition.svelte

14 lines
225 B
Svelte
Raw Normal View History

2023-01-25 22:41:11 +05:30
<script>
import { fly } from "svelte/transition";
export let pathname = "";
</script>
{#key pathname}
2023-02-03 23:25:33 +05:30
<div
in:fly={{ x: -10, duration: 250, delay: 250 }}
out:fly={{ x: 5, duration: 250 }}
>
2023-01-25 22:41:11 +05:30
<slot />
</div>
2023-02-03 23:25:33 +05:30
{/key}