diff --git a/frontend/src/components/toast.rs b/frontend/src/components/toast.rs index d0543cd..dd79064 100644 --- a/frontend/src/components/toast.rs +++ b/frontend/src/components/toast.rs @@ -8,10 +8,10 @@ use shared::NotificationLevel; /// Returns the DaisyUI alert class for the notification level fn get_alert_class(level: &NotificationLevel) -> &'static str { match level { - NotificationLevel::Info => "alert-info", - NotificationLevel::Success => "alert-success", - NotificationLevel::Warning => "alert-warning", - NotificationLevel::Error => "alert-error", + NotificationLevel::Info => "alert alert-info", + NotificationLevel::Success => "alert alert-success", + NotificationLevel::Warning => "alert alert-warning", + NotificationLevel::Error => "alert alert-error", } } @@ -23,20 +23,34 @@ fn ToastItem( ) -> impl IntoView { let alert_class = get_alert_class(&level); - let icon = match level { - NotificationLevel::Info => "ℹ️", - NotificationLevel::Success => "✓", - NotificationLevel::Warning => "⚠️", - NotificationLevel::Error => "✕", + // DaisyUI SVG icons + let icon_svg = match level { + NotificationLevel::Info => view! { + + }.into_view(), + NotificationLevel::Success => view! { + + }.into_view(), + NotificationLevel::Warning => view! { + + }.into_view(), + NotificationLevel::Error => view! { + + }.into_view(), }; view! { -