info alert backgroundColor change

master
Tudor Stanciu 2020-05-21 01:54:41 +03:00
parent 584bda1997
commit 55d3fc3f97
1 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,9 @@ const useStyles = makeStyles((theme) => ({
"& > * + *": {
marginTop: theme.spacing(2)
}
},
info: {
backgroundColor: theme.palette.primary.main
}
}));
@ -27,7 +30,7 @@ const ToastNotifier = ({ snackbar }) => {
if (snackbar.type) setOpen(true);
}, [snackbar]);
const handleClose = (event, reason) => {
const handleClose = (_, reason) => {
if (reason === "clickaway") {
return;
}
@ -40,7 +43,11 @@ const ToastNotifier = ({ snackbar }) => {
<Snackbar open={open} autoHideDuration={3000} onClose={handleClose}>
<>
{snackbar.type === snackbarType.info && (
<Alert onClose={handleClose} severity="info">
<Alert
onClose={handleClose}
severity="info"
className={classes.info}
>
{snackbar.message}
</Alert>
)}