diff --git a/docs/src/pages/components/ToastNotification.svx b/docs/src/pages/components/ToastNotification.svx index 571b6289..d924de80 100644 --- a/docs/src/pages/components/ToastNotification.svx +++ b/docs/src/pages/components/ToastNotification.svx @@ -14,6 +14,14 @@ See also: [InlineNotification](InlineNotification) +## Autoclose + +By default, `ToastNotification` does not automatically close. + +Specify the `timeout` prop to automatically close the notification after a specified duration (in milliseconds). + + + ## Prevent default close behavior `ToastNotification` is a controlled component. Prevent the default close behavior using the `e.preventDefault()` method in the dispatched `on:close` event. diff --git a/docs/src/pages/framed/ToastNotification/ToastNotificationTimeout.svelte b/docs/src/pages/framed/ToastNotification/ToastNotificationTimeout.svelte new file mode 100644 index 00000000..547ba581 --- /dev/null +++ b/docs/src/pages/framed/ToastNotification/ToastNotificationTimeout.svelte @@ -0,0 +1,32 @@ + + + + +{#if showNotification} +
+ +
+{/if}