mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
What it says on the tin Closes # [1-1512](https://linear.app/unleash/issue/1-1512/grey-out-everything-icons-labels-etc-when-strategy-is-disabled) <img width="689" alt="Screenshot 2023-10-20 at 12 25 51" src="https://github.com/Unleash/unleash/assets/104830839/3192a125-0e2a-46f2-a266-e4d6c171bdad"> <img width="711" alt="Screenshot 2023-10-20 at 14 52 30" src="https://github.com/Unleash/unleash/assets/104830839/15040439-c059-4725-9518-82e363fd7230"> --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
36 lines
991 B
TypeScript
36 lines
991 B
TypeScript
import { VFC } from 'react';
|
|
import { Box } from '@mui/material';
|
|
import { TrackChanges } from '@mui/icons-material';
|
|
|
|
interface IConstraintIconProps {
|
|
compact?: boolean;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const ConstraintIcon: VFC<IConstraintIconProps> = ({
|
|
compact,
|
|
disabled,
|
|
}) => (
|
|
<Box
|
|
sx={(theme) => ({
|
|
backgroundColor: disabled
|
|
? theme.palette.neutral.border
|
|
: '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>
|
|
);
|