forked from neo4j-labs/neodash
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from mercedes-benz/develop
VULCAN-947/Checkbox disable feature production deployment
- Loading branch information
Showing
5 changed files
with
316 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import Snackbar from '@mui/material/Snackbar'; | ||
import MuiAlert, { AlertProps } from '@mui/material/Alert'; | ||
|
||
interface NotificationProps { | ||
open: boolean; | ||
message: string; | ||
severity: 'success' | 'warning' | 'error'; | ||
onClose: () => void; | ||
} | ||
|
||
const Alert = React.forwardRef<HTMLDivElement, AlertProps>((props, ref) => { | ||
return <MuiAlert elevation={6} ref={ref} variant='filled' {...props} />; | ||
}); | ||
|
||
const Notification: React.FC<NotificationProps> = ({ open, message, severity, onClose }) => { | ||
return ( | ||
<Snackbar open={open} autoHideDuration={6000} onClose={onClose}> | ||
<Alert onClose={onClose} severity={severity}> | ||
{message} | ||
</Alert> | ||
</Snackbar> | ||
); | ||
}; | ||
|
||
export default Notification; |
Oops, something went wrong.