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', label: 'Option 2',
icon: 'basket-shopping', icon: 'basket-shopping',
description: 'Tooltip description 1', description: 'Tooltip description 1',
checked: true,
}, },
{ {
label: 'Vehicle class', label: 'Vehicle class',

View File

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