<script>
import {Notifications, acts} from '@tadashi/svelte-notification'
let triggers = [
{mode: 'normal', message: 'Nothing to say...', lifetime: 2},
{mode: 'success', message: '✓ Nice!'},
{mode: 'info', message: 'ℹ Leve a japona'},
{mode: 'warn', message: '⚠ Já chegou o disco voador!'},
{mode: 'danger', message: '☠ Alta tensão'},
];
</script>
{#each triggers as trigger}
<button
type="button"
on:click={() => {
acts.add(trigger)
}}>Add {trigger.mode}</button
>
{/each}
<Notifications />
<style>
button {
display: block;
margin: 0.3rem;
min-width: 150px;
}
</style>
<svelte:head>
<style>
:root {
--tadashi_svelte_notifications_width: 300px;
}