Checkbox
Casilla de verificación React. El estado lo posee el consumidor.
import { Checkbox } from '#LibComponents/react/atomic/checkbox/checkbox.component';<Checkbox name="acepto" label="Acepto las condiciones" onChange={fn} />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
checked | boolean | no | — | |
className | string | no | — | |
classLabelName | string | no | — | |
delegated | boolean | no | — | |
disabled | boolean | no | — | |
formName | string | no | — | |
hidden | boolean | no | — | |
id | string | no | — | |
label | ReactNode | sí | — | |
name | string | sí | — | |
onChangeFn | (inputValue: StaticFields, name?: string) => void | no | — | |
onChangeValue | (name: string, value: string | null) => void | no | — | |
onFormError | (error: ErrorOnField) => void | no | — | |
position | Position | no | — | |
required | boolean | no | — | |
tabIndex | number | no | — | |
value | string | no | — |
Ojo
- El helper de la vista previa fija los props del Checkbox, así que no hay galería de variantes.