mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
20 lines
491 B
Svelte
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>
|