diff --git a/src/Notification/InlineNotification.svelte b/src/Notification/InlineNotification.svelte index ad2d84d7..2c67a793 100644 --- a/src/Notification/InlineNotification.svelte +++ b/src/Notification/InlineNotification.svelte @@ -42,14 +42,14 @@ let open = true; let timeoutId = undefined; - function close() { + function close(closeFromTimeout) { open = false; - dispatch("close"); + dispatch("close", { timeout: closeFromTimeout === true }); } onMount(() => { if (timeout) { - timeoutId = setTimeout(() => close(), timeout); + timeoutId = setTimeout(() => close(true), timeout); } return () => { diff --git a/src/Notification/ToastNotification.svelte b/src/Notification/ToastNotification.svelte index 597295fc..b9ff3323 100644 --- a/src/Notification/ToastNotification.svelte +++ b/src/Notification/ToastNotification.svelte @@ -45,14 +45,14 @@ let open = true; let timeoutId = undefined; - function close() { + function close(closeFromTimeout) { open = false; - dispatch("close"); + dispatch("close", { timeout: closeFromTimeout === true }); } onMount(() => { if (timeout) { - timeoutId = setTimeout(() => close(), timeout); + timeoutId = setTimeout(() => close(true), timeout); } return () => {