mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-08 07:35:07 +00:00
31 lines
717 B
TypeScript
31 lines
717 B
TypeScript
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],
|
|
},
|
|
},
|
|
}));
|
|
|
|
const CustomCheckbox: React.FC<{ checked: boolean }> = ({ checked }) => {
|
|
const { classes } = useStyles();
|
|
return (
|
|
<Checkbox
|
|
checked={checked}
|
|
size="md"
|
|
classNames={{ root: classes.root, input: classes.input, inner: classes.inner }}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default CustomCheckbox;
|