Skip to content

Commit

Permalink
docs(version-2): in custom render api code, add required import
Browse files Browse the repository at this point in the history
The `toast` method was not imported but required for the `toast.dismiss()` function. I have updated the example code to import the method.
  • Loading branch information
AnishDe12020 authored Apr 28, 2022
1 parent c5e5935 commit 70f4c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/pages/docs/version-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ This is a great alternative if you are using [`useToaster()`](/docs/use-toaster)
This API allows us to dynamically react to to current state our toasts. This can be used to **change the default animations**, add **a custom dismiss button** or render a custom notification, like [TailwindUI Notifications](https://tailwindui.com/components/application-ui/overlays/notifications).

```jsx
import { Toaster, ToastBar } from 'react-hot-toast';
import { toast, Toaster, ToastBar } from 'react-hot-toast';

const CustomToaster = () => (
<Toaster>
Expand Down

0 comments on commit 70f4c86

Please sign in to comment.