Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap committed Sep 18, 2024
1 parent bbdff62 commit 6d30b3e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
30 changes: 16 additions & 14 deletions docs/data/material/components/snackbars/ToolpadNotifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ import {
} from '@toolpad/core/useNotifications';
import Button from '@mui/material/Button';

export default function ToolpadNotifications() {
function NotifyButton() {
const notifications = useNotifications();
return (
<Button
onClick={() => {
notifications.show('Consider yourself notified!', {
autoHideDuration: 3000,
});
}}
>
Notify me
</Button>
);
}

export default function ToolpadNotifications() {
return (
<NotificationsProvider>
<div>
<Button
onClick={() => {
// preview-start
notifications.show('Consider yourself notified!', {
autoHideDuration: 3000,
});
// preview-end
}}
>
Notify me
</Button>
</div>
<NotifyButton />
</NotificationsProvider>
);
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
<NotificationsProvider>
<div>
<Button
onClick={() => {
// preview-start
notifications.show('Consider yourself notified!', {
autoHideDuration: 3000,
});
// preview-end
}}
>
Notify me
</Button>
</div>
<NotifyButton />
</NotificationsProvider>

0 comments on commit 6d30b3e

Please sign in to comment.