From 36f96c87bb63df65eea32140722460d0712c8519 Mon Sep 17 00:00:00 2001 From: Astitva Patle Date: Thu, 7 Nov 2024 17:44:42 +0530 Subject: [PATCH] feat: updated toast message in auth repo [] --- .../ToastNotification.svelte | 121 ++++++++++++++++-- .../toast-notification/icons/error.svelte | 10 +- .../toast-notification/icons/success.svelte | 10 +- 3 files changed, 118 insertions(+), 23 deletions(-) diff --git a/src/lib/components/toast-notification/ToastNotification.svelte b/src/lib/components/toast-notification/ToastNotification.svelte index 53496a7..37a0c3d 100644 --- a/src/lib/components/toast-notification/ToastNotification.svelte +++ b/src/lib/components/toast-notification/ToastNotification.svelte @@ -6,15 +6,17 @@ InfoIcon, WarningIcon, CloseIcon, - } from "./icons" + } from "./icons"; - +
-
- +
+ + {#if data.type === "success"} {:else if data.type === "warning"} @@ -25,8 +27,9 @@ {/if} - {data.description} + {data.description}
+
+ + {#if data.duration > 0} +
+ {/if}
+ /* Progress bar animation */ + @keyframes progress { + from { + width: 100%; + } + to { + width: 0; + } + } + diff --git a/src/lib/components/toast-notification/icons/error.svelte b/src/lib/components/toast-notification/icons/error.svelte index e173923..f54c39c 100644 --- a/src/lib/components/toast-notification/icons/error.svelte +++ b/src/lib/components/toast-notification/icons/error.svelte @@ -1,12 +1,12 @@ diff --git a/src/lib/components/toast-notification/icons/success.svelte b/src/lib/components/toast-notification/icons/success.svelte index 20955aa..fbd9a7d 100644 --- a/src/lib/components/toast-notification/icons/success.svelte +++ b/src/lib/components/toast-notification/icons/success.svelte @@ -1,12 +1,12 @@