You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/pages/docs/toast.mdx
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ toast('Hello World', {
46
46
toast('Hello World');
47
47
```
48
48
49
-
The most basic variant. It does not have an icon by default, but you can provide one via the options.
49
+
The most basic variant. It does not have an icon by default, but you can provide one via the options. If you don't want any default styles, use `toast.custom()` instead.
50
50
51
51
### Success
52
52
@@ -78,7 +78,7 @@ Creates a custom notification with JSX without default styles.
78
78
toast.loading('Waiting...');
79
79
```
80
80
81
-
This will create a loading notification. Most likely, you want to update it manually afterwards. For a friendly alternative, check out `toast.promise()`, which takes care of that automatically.
81
+
This will create a loading notification. Most likely, you want to update it afterwards. For a friendly alternative, check out `toast.promise()`, which takes care of that automatically.
82
82
83
83
### Promise
84
84
@@ -153,19 +153,19 @@ You can dismiss all toasts at once, by leaving out the `toastId`.
153
153
#### Dismiss all toasts at one
154
154
155
155
```js
156
-
toast.dismiss()
156
+
toast.dismiss();
157
157
```
158
158
159
159
To remove toasts instantly without any animations, use `toast.remove`.
This release is all about **flexibility**. It allows you to create the notification system of your dreams, even simpler. Before we dig deeper into the new APIs, check out what's included in this release:
13
13
14
-
<divclassName="text-lg">
15
-
<spanstyle={{ margin: '10px' }}>✨</span> <spanclassName="font-semibold">toast.custom()</span> <spanclassName="text-toast-700">- Dispatch components as toast</span>
14
+
<divclassName="">
15
+
<spanstyle={{ margin: '10px' }}>✨</span> <ahref="#introducing-toastcustom"className="font-semibold">toast.custom()</a> <spanclassName="">- Dispatch components as toast</span>
<spanstyle={{ margin: '10px' }}>⚙️</span> <spanclassName="font-semibold">Custom Renderer API</span> <spanclassName="text-toast-700">- Supply your own render function</span>
41
+
<spanstyle={{ margin: '10px' }}>⚙️</span> <ahref="#custom-renderer-api"className="font-semibold">Custom Renderer API</a> <spanclassName="">- Supply your own render function</span>
35
42
</div>
36
43
37
-
As well as a many other improvements and fixes.
44
+
As well as a many [other improvements and fixes](#changelog).
38
45
39
46
## Introducing `toast.custom()`
40
47
@@ -136,7 +143,7 @@ The offset is now controlled by the Toaster and can be changed by overwriting th
136
143
137
144
## Custom Renderer API
138
145
139
-
You can now use the [`<Toaster/>`](/docs/toaster) to render your own components. Pass in a function that receives a [Toast](https://github.com/timolins/react-hot-toast/blob/main/src/core/types.ts#L34) as the first argument, allowing you to render whatever you please.
146
+
You can now use the [`<Toaster/>`](/docs/toaster#using-a-custom-render-function) to render your own components. Pass in a function that receives a [Toast](https://github.com/timolins/react-hot-toast/blob/main/src/core/types.ts#L34) as the first argument, allowing you to render whatever you please.
140
147
141
148
This is a great alternative if you are using [`useToaster()`](/docs/use-toaster) to render create custom notfications.
0 commit comments