refactor(web/menu): update checkbox styling

This commit is contained in:
Luke
2022-10-29 12:46:22 +02:00
parent 5ba1a3b8f9
commit c227282ce0
2 changed files with 15 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ export const debugMenu = () => {
label: 'Option 2',
icon: 'basket-shopping',
description: 'Tooltip description 1',
checked: true,
},
{
label: 'Vehicle class',

View File

@@ -4,33 +4,33 @@ const CustomCheckbox: React.FC<{ checked: boolean }> = ({ checked }) => {
const { getCheckboxProps, getInputProps, htmlProps } = useCheckbox();
return (
<chakra.label
display='flex'
flexDirection='row'
alignItems='center'
display="flex"
flexDirection="row"
alignItems="center"
gridColumnGap={2}
pr={4}
cursor='pointer'
pr={3}
cursor="pointer"
{...htmlProps}
>
<input {...getInputProps()} hidden />
<Flex
alignItems='center'
justifyContent='center'
border='2px solid'
borderColor='#909296'
alignItems="center"
justifyContent="center"
border="2px solid"
borderColor="#909296"
rounded={'sm'}
w={6}
h={6}
w={5}
h={5}
{...getCheckboxProps()}
>
{checked && (
<Box w={5} h={5} bg='#25262B'>
<CheckboxIcon isChecked color={'#373A40'} />
<Box w={4} h={4} bg="#909296">
<CheckboxIcon isChecked color="#25262B" />
</Box>
)}
</Flex>
</chakra.label>
)
);
};
export default CustomCheckbox;