UNPKG

@trellixio/roaster-coffee

Version:
37 lines 1.68 kB
import * as React from 'react'; import { ForwardRefWithStaticComponents } from '@/types'; import { CheckboxGroup } from './CheckboxGroup/CheckboxGroup'; export interface CheckboxProps { /** The HTML ID attribute to be applied to the checkbox input element (optional). */ id?: string; /** The name attribute to be applied to the checkbox input element (optional). */ name?: string; /** * The value attribute to be applied to the checkbox input element (required). * This value is submitted with the form data when the checkbox is checked. */ value: string; /** Whether the checkbox input should be checked (optional). */ checked?: boolean; /** Whether the checkbox input should be disabled (optional). */ disabled?: boolean; /** The label to be displayed next to the checkbox input (optional). */ label?: React.ReactNode; /** CSS class names to be applied to the label element (optional). */ labelClassName?: string; /** CSS class names to be applied to the checkbox input element (optional). */ inputClassName?: string; /** Whether the checkbox should be displayed as a rich selector with additional elements (optional). */ isRichSelector?: boolean; /** * A function to be called when the value of the checkbox input changes (optional). * The function receives the new status of the checkbox as a boolean value. */ onChange?(status: boolean): void; } declare type CheckboxComponent = ForwardRefWithStaticComponents<CheckboxProps, { Group: typeof CheckboxGroup; }>; export declare const Checkbox: CheckboxComponent; export {}; //# sourceMappingURL=Checkbox.d.ts.map