2023-06-01 08:27:39 +00:00
|
|
|
import { Checkbox, CheckboxProps, Text } from '@chakra-ui/react';
|
2023-06-03 03:06:37 +00:00
|
|
|
import { memo, ReactElement } from 'react';
|
2023-06-01 08:27:39 +00:00
|
|
|
|
|
|
|
type IAISimpleCheckboxProps = CheckboxProps & {
|
2023-06-03 03:06:37 +00:00
|
|
|
label: string | ReactElement;
|
2023-06-01 08:27:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const IAISimpleCheckbox = (props: IAISimpleCheckboxProps) => {
|
|
|
|
const { label, ...rest } = props;
|
|
|
|
return (
|
|
|
|
<Checkbox colorScheme="accent" {...rest}>
|
|
|
|
<Text color="base.200" fontSize="md">
|
|
|
|
{label}
|
|
|
|
</Text>
|
|
|
|
</Checkbox>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default memo(IAISimpleCheckbox);
|