diff --git a/src/lib/layout/notification.svelte b/src/lib/layout/notification.svelte index 58aa43798..01ee630e9 100644 --- a/src/lib/layout/notification.svelte +++ b/src/lib/layout/notification.svelte @@ -3,17 +3,54 @@ import type { Notification } from '../stores/notifications'; export let type: Notification['type'] = 'info'; + export let title: Notification['title']; + + let icon: string; + switch (type) { + case 'success': + icon = 'check-circle'; + break; + case 'warning': + icon = 'exclamation'; + break; + + case 'error': + icon = 'exclamation-circle'; + break; + + case 'info': + icon = 'info'; + break; + + default: + icon = ''; + break; + } const dispatch = createEventDispatcher(); -