Skip to content

An opinionated toast component for React.

Update docs

emilkowalski3295698d540e
diff --git a/website/src/pages/toast.mdx b/website/src/pages/toast.mdx
index 8a7eda0..5c746a3 100644
--- a/website/src/pages/toast.mdx
+++ b/website/src/pages/toast.mdx
@@ -47,7 +47,7 @@ toast.error('My error toast');
### Action
-Renders a primary button, clicking it will close the toast and run the callback passed via `onClick`.
+Renders a primary button, clicking it will close the toast and run the callback passed via `onClick`. You can prevent the toast from closing by calling `event.preventDefault()` in the `onClick` callback.
```jsx
toast('My action toast', {
@@ -86,6 +86,14 @@ toast.promise(myPromise, {
});
```
+### Loading
+
+Renders a toast with a loading spinner. Useful when you want to handle various states yourself instead of using a promise toast.
+
+```jsx
+toast.loading('Loading data');
+```
+
### Custom
You can pass jsx as the first argument instead of a string to render a custom toast while maintaining default styling.