1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/maintenance/MaintenanceBanner.tsx
NicolaeUnleash 705462f0cf
feat: dark theme v1 (#3298)
## About the changes

Creating the first version of the Dark theme

Refactor: colors variables
Refactor: use theme variable instead 
- this change will help us to use MuiCssBaseline, and we can use classes
directly for easy customization when we can't identify MUI classes

Refactor: adjusting some files components
- i’ve touched also the structure of some files, not only the colors
variables (but only to adjust the style, not functionality)

Fix: dark mode persistence on refresh (by Nuno)

Feat: dark mode sees light logos, and light mode sees dark logos (by
Nuno)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2023-03-22 16:37:40 +02:00

38 lines
1.1 KiB
TypeScript

import { styled } from '@mui/material';
import { ErrorOutlineRounded } from '@mui/icons-material';
const StyledErrorRoundedIcon = styled(ErrorOutlineRounded)(({ theme }) => ({
color: theme.palette.error.main,
height: '20px',
width: '20px',
marginRight: theme.spacing(1),
}));
const StyledDiv = styled('div')(({ theme }) => ({
display: 'flex',
fontSize: theme.fontSizes.smallBody,
justifyContent: 'center',
alignItems: 'center',
color: theme.palette.error.contrastText,
backgroundColor: theme.palette.error.light,
height: '65px',
borderBottom: `1px solid ${theme.palette.error.border}`,
whiteSpace: 'pre-wrap',
}));
const MaintenanceBanner = () => {
return (
<StyledDiv>
<StyledErrorRoundedIcon />
<b>Maintenance Mode! </b>
<p>
During maintenance mode, any changes made will not be saved and
you may receive an error. We apologize for any inconvenience
this may cause.
</p>
</StyledDiv>
);
};
export default MaintenanceBanner;