mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-23 09:08:24 +00:00
fix: toast issues (#6209)
This commit is contained in:
parent
93ca6ac906
commit
9930efdc84
5 changed files with 16 additions and 28 deletions
|
|
@ -81,11 +81,10 @@ function AppConfig ({ children }: { children: React.ReactNode }) {
|
|||
enqueueSnackbar(message, { variant: 'success' });
|
||||
},
|
||||
error: (message: string) => {
|
||||
console.log('error', message);
|
||||
enqueueSnackbar(message, { variant: 'error' });
|
||||
},
|
||||
warning: (message: string) => {
|
||||
enqueueSnackbar(message, { variant: 'warning' });
|
||||
enqueueSnackbar(message, { variant: 'warning', autoHideDuration: 500000000000 });
|
||||
},
|
||||
default: (message: string) => {
|
||||
enqueueSnackbar(message, { variant: 'default' });
|
||||
|
|
|
|||
|
|
@ -8,29 +8,18 @@ import { styled } from '@mui/material';
|
|||
import { InfoSnackbar } from '../_shared/notify';
|
||||
|
||||
const StyledSnackbarProvider = styled(SnackbarProvider)`
|
||||
&.notistack-MuiContent-default {
|
||||
background-color: var(--fill-toolbar);
|
||||
}
|
||||
&.notistack-MuiContent-default {
|
||||
background-color: var(--fill-toolbar);
|
||||
}
|
||||
|
||||
&.notistack-MuiContent-info {
|
||||
background-color: var(--function-info);
|
||||
}
|
||||
&.notistack-MuiContent-info {
|
||||
background-color: var(--function-info);
|
||||
}
|
||||
|
||||
&.notistack-MuiContent-success {
|
||||
background-color: var(--function-success);
|
||||
}
|
||||
|
||||
&.notistack-MuiContent-error {
|
||||
background-color: var(--function-error);
|
||||
}
|
||||
|
||||
&.notistack-MuiContent-warning {
|
||||
background-color: var(--function-warning);
|
||||
}
|
||||
`;
|
||||
|
||||
export default function withAppWrapper(Component: React.FC): React.FC {
|
||||
return function AppWrapper(): JSX.Element {
|
||||
export default function withAppWrapper (Component: React.FC): React.FC {
|
||||
return function AppWrapper (): JSX.Element {
|
||||
return (
|
||||
<AppTheme>
|
||||
<ErrorBoundary FallbackComponent={ErrorHandlerPage}>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@
|
|||
--function-error: #fb006d;
|
||||
--function-error-hover: #ff4f8a;
|
||||
--function-error-opacity: rgba(251, 0, 109, 0.1);
|
||||
--function-waring: #ffd667;
|
||||
--function-waring-hover: #ffdf8f;
|
||||
--function-waring-opacity: rgba(255, 214, 103, 0.1);
|
||||
--function-warning: #ffd667;
|
||||
--function-warning-hover: #ffdf8f;
|
||||
--function-warning-opacity: rgba(255, 214, 103, 0.1);
|
||||
--function-success: #66cf80;
|
||||
--function-success-hover: #66cf00;
|
||||
--function-success-opacity: rgba(102, 207, 128, 0.1);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/**
|
||||
* Do not edit directly
|
||||
* Generated on Fri, 06 Sep 2024 02:15:53 GMT
|
||||
* Generated on Fri, 06 Sep 2024 04:24:51 GMT
|
||||
* Generated from $pnpm css:variables
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/**
|
||||
* Do not edit directly
|
||||
* Generated on Fri, 06 Sep 2024 02:15:53 GMT
|
||||
* Generated on Fri, 06 Sep 2024 04:24:51 GMT
|
||||
* Generated from $pnpm css:variables
|
||||
*/
|
||||
|
||||
|
|
@ -59,8 +59,8 @@ module.exports = {
|
|||
"function": {
|
||||
"error": "var(--function-error)",
|
||||
"error-hover": "var(--function-error-hover)",
|
||||
"waring": "var(--function-waring)",
|
||||
"waring-hover": "var(--function-waring-hover)",
|
||||
"warning": "var(--function-warning)",
|
||||
"warning-hover": "var(--function-warning-hover)",
|
||||
"success": "var(--function-success)",
|
||||
"success-hover": "var(--function-success-hover)",
|
||||
"info": "var(--function-info)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue