import type { BooleanFormField } from '@douglasneuroinformatics/libui-form-types'; import type { Simplify } from 'type-fest'; import { Checkbox, Label } from '#components'; import { FieldGroup } from '../FieldGroup/FieldGroup.tsx'; import type { BaseFieldComponentProps } from '../types.ts'; export type BooleanFieldCheckboxProps = Simplify< BaseFieldComponentProps & Omit, 'kind'> >; export const BooleanFieldCheckbox = ({ description, disabled, error, label, name, readOnly, setValue, value }: BooleanFieldCheckboxProps) => { return ( { if (typeof value === 'boolean') { setValue(value); } }} /> ); };