Skip to content

Commit

Permalink
Merge pull request #5961 from WiXSL/fix-success-notification-type
Browse files Browse the repository at this point in the history
Add success notification type
  • Loading branch information
fzaninotto authored Feb 26, 2021
2 parents e989299 + 7141a2a commit 037af98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ra-core/src/actions/notificationActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const SHOW_NOTIFICATION = 'RA/SHOW_NOTIFICATION';

export type NotificationType = 'info' | 'warning' | 'error';
export type NotificationType = 'success' | 'info' | 'warning' | 'error';

interface NotificationOptions {
// The duration in milliseconds the notification is shown
Expand Down
4 changes: 4 additions & 0 deletions packages/ra-ui-materialui/src/layout/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ interface Props {

const useStyles = makeStyles(
(theme: Theme) => ({
success: {
backgroundColor: theme.palette.success.main,
color: theme.palette.success.contrastText,
},
error: {
backgroundColor: theme.palette.error.dark,
color: theme.palette.error.contrastText,
Expand Down

0 comments on commit 037af98

Please sign in to comment.