Files
console/src/lib/layout/notification.svelte
T
2022-03-09 13:10:09 +01:00

20 lines
491 B
Svelte

<script lang="ts">
import { createEventDispatcher } from 'svelte';
import type { Notification } from '../stores/notifications';
export let type: Notification['type'] = 'info';
const dispatch = createEventDispatcher();
</script>
<li class="toaster-item">
<div class={`toaster-message is-${type}`}>
<button class="x-button" on:click={() => dispatch('dismiss')}>
<span class="icon-cancel" aria-hidden="true" />
</button>
<span class="text">
<slot />
</span>
</div>
</li>