mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
## 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>
30 lines
859 B
TypeScript
30 lines
859 B
TypeScript
import { VFC } from 'react';
|
|
import { Box } from '@mui/material';
|
|
import { TrackChanges } from '@mui/icons-material';
|
|
|
|
interface IConstraintIconProps {
|
|
compact?: boolean;
|
|
}
|
|
|
|
export const ConstraintIcon: VFC<IConstraintIconProps> = ({ compact }) => (
|
|
<Box
|
|
sx={{
|
|
backgroundColor: 'primary.light',
|
|
p: compact ? '1px' : '2px',
|
|
borderRadius: '50%',
|
|
width: compact ? '18px' : '24px',
|
|
height: compact ? '18px' : '24px',
|
|
marginRight: '13px',
|
|
}}
|
|
>
|
|
<TrackChanges
|
|
sx={theme => ({
|
|
fill: theme.palette.common.white,
|
|
display: 'block',
|
|
width: compact ? theme.spacing(2) : theme.spacing(2.5),
|
|
height: compact ? theme.spacing(2) : theme.spacing(2.5),
|
|
})}
|
|
/>
|
|
</Box>
|
|
);
|