Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] add customization section to notifications #4672

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@

{{"demo": "ScopedNotification.js"}}

## Customization

If you want to customize the notification experience, such as the position of the notification, you can provide a custom [`Snackbar`](https://mui.com/material-ui/react-snackbar/) configuration to the `NotificationsProvider`. Applying these configurations at the provider level will globally set the behavior of all notifications in your application.

Check warning on line 80 in docs/data/toolpad/core/components/use-notifications/use-notifications.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/data/toolpad/core/components/use-notifications/use-notifications.md", "range": {"start": {"line": 80, "column": 278}}}, "severity": "WARNING"}

```js
<NotificationsProvider
slotProps={{
snackbar: {
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
},
}}
>
```

## 🚧 Notification center

When multiple notifications are available, click the badge to open the notification center to show a scrollable list of all available notifications. This feature is not available yet.
Expand Down
Loading