UNPKG

liber-salti

Version:

Saltí - Liber Design System

43 lines (42 loc) 1.19 kB
/// <reference types="react" /> export interface FormControlLabelProps { /** * If `true`, the component appears selected. */ checked?: boolean; /** * A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`. */ control: React.ReactElement<any, any>; /** * If `true`, the control will be disabled. */ disabled?: boolean; /** * Pass a ref to the `input` element. */ inputRef?: React.Ref<any>; /** * The text to be used in an enclosing label element. */ label: React.ReactNode; /** * The position of the label. */ labelPlacement?: 'end' | 'start' | 'top' | 'bottom'; /** * Name of the component */ name?: string; /** * Callback fired when the state is changed. * * @param {object} event The event source of the callback. * You can pull out the new checked state by accessing `event.target.checked` (boolean). */ onChange?: (event: React.ChangeEvent<unknown>, checked: boolean) => void; /** * The value of the component. */ value?: unknown; }