mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
refactor(web/menu): update checkbox styling
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user