2023-01-02 13:45:19 +01:00
|
|
|
import { Checkbox, createStyles, Stack } from '@mantine/core';
|
|
|
|
|
|
|
|
|
|
const useStyles = createStyles((theme) => ({
|
|
|
|
|
root: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
},
|
|
|
|
|
input: {
|
|
|
|
|
backgroundColor: theme.colors.dark[7],
|
|
|
|
|
'&:checked': { backgroundColor: theme.colors.dark[2], borderColor: theme.colors.dark[2] },
|
|
|
|
|
},
|
|
|
|
|
inner: {
|
|
|
|
|
'> svg > path': {
|
|
|
|
|
fill: theme.colors.dark[6],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}));
|
2022-10-29 12:23:15 +02:00
|
|
|
|
|
|
|
|
const CustomCheckbox: React.FC<{ checked: boolean }> = ({ checked }) => {
|
2023-01-02 13:45:19 +01:00
|
|
|
const { classes } = useStyles();
|
2022-10-29 12:23:15 +02:00
|
|
|
return (
|
2023-01-02 13:45:19 +01:00
|
|
|
<Checkbox
|
|
|
|
|
checked={checked}
|
|
|
|
|
size="md"
|
|
|
|
|
classNames={{ root: classes.root, input: classes.input, inner: classes.inner }}
|
|
|
|
|
/>
|
2022-10-29 12:46:22 +02:00
|
|
|
);
|
2022-10-29 12:23:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default CustomCheckbox;
|