diff --git a/src/lib/components/toast/Toast.svelte b/src/lib/components/toast/Toast.svelte index ed34fc2..17710d1 100644 --- a/src/lib/components/toast/Toast.svelte +++ b/src/lib/components/toast/Toast.svelte @@ -8,28 +8,39 @@
- {#each $toast as message (message.id)} + {#each $toast as toastData (toastData.id)}
toast.remove(message.id)} + aria-label={toastData.dismissible ? "Click to dismiss" : `${toastData.message}`} + on:click={() => toastData.dismissible && toast.remove(toastData.id)} in:fly={{ opacity: 0, x: 100 }} out:fade animate:flip - class={`toast ${message.type.toLowerCase()}`} + class={`toast ${toastData.type.toLowerCase()}`} > - + + {#if toastData.dismissible && toastData.showButton} + + {/if}
{/each}
-