2022-10-27 04:24:00 +00:00
|
|
|
import { Checkbox, CheckboxProps } from '@chakra-ui/react';
|
2023-03-09 09:30:29 +00:00
|
|
|
import { memo, ReactNode } from 'react';
|
2022-10-27 04:24:00 +00:00
|
|
|
|
|
|
|
type IAICheckboxProps = CheckboxProps & {
|
2022-12-24 20:28:59 +00:00
|
|
|
label: string | ReactNode;
|
2022-10-27 04:24:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const IAICheckbox = (props: IAICheckboxProps) => {
|
2023-03-06 09:02:40 +00:00
|
|
|
const { label, ...rest } = props;
|
2022-10-27 04:24:00 +00:00
|
|
|
return (
|
2023-03-06 09:02:40 +00:00
|
|
|
<Checkbox colorScheme="accent" {...rest}>
|
2022-10-27 04:24:00 +00:00
|
|
|
{label}
|
|
|
|
</Checkbox>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2023-03-09 09:30:29 +00:00
|
|
|
export default memo(IAICheckbox);
|