WIP: Staged all changes
This commit is contained in:
15
frontend/src/components/Toast.svelte
Normal file
15
frontend/src/components/Toast.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
import { toasts } from '../lib/toasts.js';
|
||||
</script>
|
||||
|
||||
<div class="fixed bottom-0 right-0 p-4 space-y-2">
|
||||
{#each $toasts as toast (toast.id)}
|
||||
<div class="p-4 rounded-md shadow-lg text-white
|
||||
{toast.type === 'info' && 'bg-blue-500'}
|
||||
{toast.type === 'success' && 'bg-green-500'}
|
||||
{toast.type === 'error' && 'bg-red-500'}
|
||||
">
|
||||
{toast.message}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
Reference in New Issue
Block a user