import type { BaseElementProps } from './types'; import type { CheckboxProps as AntCheckboxProps } from 'antd'; import { Checkbox as AntCheckbox, Form } from 'antd'; import type { CheckboxChangeEvent } from 'antd/lib/checkbox'; import type { FC } from 'react'; const { Item: FormItem } = Form; type ElementProps = { text: string; }; type CheckboxProps = AntCheckboxProps & ElementProps; function Checkbox({ value, setValue, status, isValid, help, text, ...props }: BaseElementProps & ElementProps) { function handleChange(event: CheckboxChangeEvent) { setValue(event.target.checked); } return ( {text} ); } export default Checkbox as FC;