From 2eb15b01c31c5279f7d730ef1b577c01379c152f Mon Sep 17 00:00:00 2001 From: Jordan Shatford Date: Sun, 13 Aug 2023 12:53:04 +1000 Subject: [PATCH] fix(frontend): default variant for Alert component Signed-off-by: Jordan Shatford --- frontend/src/lib/components/ui/Alert.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/ui/Alert.svelte b/frontend/src/lib/components/ui/Alert.svelte index c58d5f52..02fd2600 100644 --- a/frontend/src/lib/components/ui/Alert.svelte +++ b/frontend/src/lib/components/ui/Alert.svelte @@ -7,7 +7,7 @@ } from 'svelte-feather-icons'; import { Variant } from '$lib/utils/types'; - export let variant: Variant; + export let variant: Variant = Variant.DEFAULT; export let title: string; export let message: string | null = null; @@ -27,6 +27,10 @@ [Variant.INFO]: { icon: InfoIcon, class: 'text-blue-800 bg-blue-200' + }, + [Variant.DEFAULT]: { + icon: undefined, + class: 'bg-zinc-400 text-zinc-800' } }; @@ -37,7 +41,9 @@ >
- + {#if themes[variant].icon} + + {/if}

{title}

{#if message}