Skip to content

Commit

Permalink
docs: fix typo on custom toaster
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisaraiva19 committed May 25, 2021
1 parent 7af1a17 commit e448a6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions site/pages/docs/toast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ toast('Hello World', {

### Blank

```
```js
toast('Hello World');
```

Expand Down Expand Up @@ -152,15 +152,15 @@ You can dismiss all toasts at once, by leaving out the `toastId`.

#### Dismiss all toasts at one

```
```js
toast.dismiss()
```

To remove toasts instantly without any animations, use `toast.remove`.

#### Remove toasts instanstly

```
```js
toast.remove(toastId)

// or
Expand Down
2 changes: 1 addition & 1 deletion site/pages/docs/use-toaster-store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions site/pages/docs/use-toaster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit e448a6e

Please sign in to comment.