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