@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
28 lines (27 loc) • 1 kB
TypeScript
import { type CheckboxFieldProps as UiCheckboxFieldProps } from '@mitcsutt/kiln-ui';
import type { ControlledKeys } from '../internal/controlledKeys.js';
import { type CommonFieldProps } from '../../../hooks/useFieldBinding.js';
export interface FormCheckboxFieldProps extends Omit<UiCheckboxFieldProps, ControlledKeys | 'checked' | 'defaultChecked' | 'onCheckedChange'>, CommonFieldProps<boolean> {
}
/**
* A single checkbox bound to a `boolean` path.
*
* @remarks
* It renders kiln-ui's {@link CheckboxField | CheckboxField}.
*
* @example In a schema
* ```json
* {
* "kind": "checkbox",
* "name": "terms",
* "label": "I've read the terms of carriage"
* }
* ```
*
* @value `boolean`
* @empty `false`
*
* @privateRemarks
* A single checkbox bound to a `boolean` path (§7.2 `checkbox`). Empty is `false`.
*/
export declare const FormCheckboxField: import("../../../kit/contracts.js").FieldDef<import("../../../kit/contracts.js").ExactContract<boolean>, FormCheckboxFieldProps>;