mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
18 lines
376 B
Svelte
18 lines
376 B
Svelte
<script lang="ts">
|
|
import { toasts } from '$lib/toasts';
|
|
|
|
let toastList: any[] = [];
|
|
|
|
toasts.subscribe((value) => {
|
|
toastList = value;
|
|
console.log(toastList);
|
|
});
|
|
</script>
|
|
|
|
<div class="toast toast-top toast-end z-50 min-w-20">
|
|
{#each toastList as { type, message, id, duration }}
|
|
<div class="alert alert-{type}">
|
|
<span>{message}</span>
|
|
</div>
|
|
{/each}
|
|
</div>
|