14 lines
506 B
Svelte
14 lines
506 B
Svelte
<script lang="ts">
|
|
import { dismissToast, toasts } from '@components/toast/Toast.ts';
|
|
import { fly } from 'svelte/transition';
|
|
</script>
|
|
|
|
<div class="toast toast-end toast-bottom z-[9999]">
|
|
{#each $toasts as toast (toast.id)}
|
|
<div class="alert" role="status" aria-live="polite" transition:fly={{ y: 8, duration: 150 }}>
|
|
<span>{toast.message}</span>
|
|
<button class="cursor-pointer" onclick={() => dismissToast(toast.id)} aria-label="Schließen">✕</button>
|
|
</div>
|
|
{/each}
|
|
</div>
|