migrate: convert most components to svelte 5

This commit is contained in:
Xylight committed 2024-10-25 19:33:27 -07:00
1 parent d670f39f0a
commit 10ef4123da
225 files changed
+5441 -3341

No files matched your search

+11 -9
View File
@@ -1,4 +1,4 @@
<script lang="ts" context="module">
<script lang="ts" module>
import { writable } from 'svelte/store'
interface PageScopedError {
@@ -24,17 +24,19 @@
import { expoOut } from 'svelte/easing'
import { onDestroy } from 'svelte'
export let scope: string | undefined | null = undefined
$: scopedErrors = $errors.filter(
(e) => e.scope == scope || e.scope == 'global'
)
onDestroy(() => {
clearErrorScope(scope)
})
let clazz: string = ''
export { clazz as class }
interface Props {
scope?: string | undefined | null
class?: string
}
let { scope = undefined, class: clazz = '' }: Props = $props()
let scopedErrors = $derived(
$errors.filter((e) => e.scope == scope || e.scope == 'global'),
)
</script>
{#if scopedErrors.length > 0}