info alert backgroundColor change
parent
584bda1997
commit
55d3fc3f97
|
@ -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>
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue