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