chore(web): migration svelte 5 syntax (#13883)

This commit is contained in:
Alex
2024-11-14 08:43:25 -06:00
committed by GitHub
parent 9203a61709
commit 0b3742cf13
310 changed files with 6435 additions and 4176 deletions

View File

@@ -3,14 +3,29 @@
import { fly } from 'svelte/transition';
import Combobox, { type ComboBoxOption } from '$lib/components/shared-components/combobox.svelte';
import { t } from 'svelte-i18n';
import type { Snippet } from 'svelte';
export let title: string;
export let comboboxPlaceholder: string;
export let subtitle = '';
export let isEdited = false;
export let options: ComboBoxOption[];
export let selectedOption: ComboBoxOption;
export let onSelect: (combobox: ComboBoxOption | undefined) => void;
interface Props {
title: string;
comboboxPlaceholder: string;
subtitle?: string;
isEdited?: boolean;
options: ComboBoxOption[];
selectedOption: ComboBoxOption;
onSelect: (combobox: ComboBoxOption | undefined) => void;
children?: Snippet;
}
let {
title,
comboboxPlaceholder,
subtitle = '',
isEdited = false,
options,
selectedOption,
onSelect,
children,
}: Props = $props();
</script>
<div class="grid grid-cols-2">
@@ -33,6 +48,6 @@
</div>
<div class="flex items-center">
<Combobox label={title} hideLabel={true} {selectedOption} {options} placeholder={comboboxPlaceholder} {onSelect} />
<slot />
{@render children?.()}
</div>
</div>