Open
Description
uppon update to svelte kit 2.0, this not working any more.
code
toast.push({
component: {
src: SuccesToast,
props: {
header: 'Successfully Saved!',
detail: 'Database is backup'
}
}
})
succesToast.svelte
<script lang="ts">
export let header: any
export let detail: any = 'Successfully Saved!'
</script>
<div class="mb-2 font-semibold">
<i class="fa-light fa-circle-check fa-xl mr-2 text-green-400"></i>
<span class="capitalize">{header}</span>
</div>
<div class="mb-0.5 text-green-300">
<i
class="fa-light fa-circle-check fa-xl invisible mr-2 text-green-400"
></i>
<span>{detail}</span>
</div>
Error
No overload matches this call.
Overload 1 of 2, '(msg: string, options?: SvelteToastOptions): number', gave the following error.
Argument of type '{ component: { src: typeof SuccesToast; props: { header: string; detail: string; }; }; }' is not assignable to parameter of type 'string'.
Overload 2 of 2, '(options: SvelteToastOptions): number', gave the following error.
Type 'typeof SuccesToast__SvelteComponent_' is not
Metadata
Metadata
Assignees
Labels
No labels