Skip to content

Commit

Permalink
update API reference for toast() (#471)
Browse files Browse the repository at this point in the history
also update `cancel` toastOption docs
  • Loading branch information
plbstl authored Sep 10, 2024
1 parent 8fe7045 commit 953ebd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions website/src/pages/toast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ toast('My cancel toast', {
});
```

You can also render jsx as your action.
You can also render jsx in the cancel option.

```jsx
toast('My cancel toast', {
action: <Button onClick={() => console.log('Cancel!')}>Cancel</Button>,
cancel: <Button onClick={() => console.log('Cancel!')}>Cancel</Button>,
});
```

Expand Down Expand Up @@ -222,5 +222,5 @@ toast.dismiss();
| onDismiss | The function gets called when either the close button is clicked, or the toast is swiped. | `-` |
| onAutoClose | Function that gets called when the toast disappears automatically after it's timeout (duration` prop). | `-` |
| unstyled | Removes the default styling, which allows for easier customization. | `false` |
| actionButtonStyles | Styles for the action button | `{}` |
| cancelButtonStyles | Styles for the cancel button | `{}` |
| actionButtonStyle | Styles for the action button | `{}` |
| cancelButtonStyle | Styles for the cancel button | `{}` |

0 comments on commit 953ebd5

Please sign in to comment.