diff --git a/web/berry/src/constants/SnackbarConstants.js b/web/berry/src/constants/SnackbarConstants.js index 19523da1..05f79231 100644 --- a/web/berry/src/constants/SnackbarConstants.js +++ b/web/berry/src/constants/SnackbarConstants.js @@ -1,24 +1,56 @@ +import { closeSnackbar } from 'notistack'; +import { IconX } from '@tabler/icons-react'; +import { IconButton } from '@mui/material'; +const action = (snackbarId) => ( + <> + { + closeSnackbar(snackbarId); + }} + > + + + +); + export const snackbarConstants = { Common: { ERROR: { variant: 'error', - autoHideDuration: 5000 + autoHideDuration: 5000, + preventDuplicate: true, + action }, WARNING: { variant: 'warning', - autoHideDuration: 10000 + autoHideDuration: 10000, + preventDuplicate: true, + action }, SUCCESS: { variant: 'success', - autoHideDuration: 1500 + autoHideDuration: 1500, + preventDuplicate: true, + action }, INFO: { variant: 'info', - autoHideDuration: 3000 + autoHideDuration: 3000, + preventDuplicate: true, + action }, NOTICE: { variant: 'info', - autoHideDuration: 7000 + autoHideDuration: 20000, + preventDuplicate: true, + action + }, + COPY: { + variant: 'copy', + persist: true, + preventDuplicate: true, + allowDownload: true, + action } }, Mobile: {