From e448a6ef6076cadb5dbbaa859126a2f4d462ff19 Mon Sep 17 00:00:00 2001 From: Rui Saraiva Date: Tue, 25 May 2021 09:26:38 +0100 Subject: [PATCH] docs: fix typo on custom toaster --- site/pages/docs/toast.mdx | 6 +++--- site/pages/docs/use-toaster-store.mdx | 2 +- site/pages/docs/use-toaster.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/site/pages/docs/toast.mdx b/site/pages/docs/toast.mdx index b96ca9b..4b59d1b 100644 --- a/site/pages/docs/toast.mdx +++ b/site/pages/docs/toast.mdx @@ -42,7 +42,7 @@ toast('Hello World', { ### Blank -``` +```js toast('Hello World'); ``` @@ -152,7 +152,7 @@ You can dismiss all toasts at once, by leaving out the `toastId`. #### Dismiss all toasts at one -``` +```js toast.dismiss() ``` @@ -160,7 +160,7 @@ To remove toasts instantly without any animations, use `toast.remove`. #### Remove toasts instanstly -``` +```js toast.remove(toastId) // or diff --git a/site/pages/docs/use-toaster-store.mdx b/site/pages/docs/use-toaster-store.mdx index a8376ad..3dd8911 100644 --- a/site/pages/docs/use-toaster-store.mdx +++ b/site/pages/docs/use-toaster-store.mdx @@ -13,7 +13,7 @@ This hook gives you access to the internal toaster state. This is the right choi In comparison to [`useToaster()`](/docs/use-toaster) it does not handle pausing or provide handlers for creating your own notification system. -``` +```jsx import { useToasterStore } from "react-hot-toast"; const { toasts, pausedAt } = useToasterStore(); diff --git a/site/pages/docs/use-toaster.mdx b/site/pages/docs/use-toaster.mdx index ec2aae9..47913cb 100644 --- a/site/pages/docs/use-toaster.mdx +++ b/site/pages/docs/use-toaster.mdx @@ -71,9 +71,9 @@ const Notifications = () => { onMouseLeave={endPause} > {toasts.map((toast) => { - const offset = calculateOffset(toast.id, { + const offset = calculateOffset(toast, { reverseOrder: false, - margin: 8, + gutter: 8, }); const ref = (el) => {