cleanup: switch to $state for themes

This commit is contained in:
James Xylight committed 2025-02-10 17:34:40 -08:00
1 parent a5ba6d66f6
commit 80df5c5409
19 files changed
+169 -349

No files matched your search

+4 -6
View File
@@ -1,8 +1,6 @@
<script lang="ts">
import { run } from 'svelte/legacy'
import { expoOut } from 'svelte/easing'
import { tweened } from 'svelte/motion'
import { Tween } from 'svelte/motion'
interface Props {
progress?: number
@@ -10,14 +8,14 @@
let { progress = 0 }: Props = $props()
let tween = tweened(progress, { easing: expoOut })
let tween = new Tween(progress, { easing: expoOut })
run(() => {
$effect(() => {
tween.set(progress)
})
</script>
<div
class="bg-primary-900 dark:bg-primary-100 h-1 rounded-full"
style="width: {$tween * 100}%;"
style="width: {tween.current * 100}%;"
></div>