Switch
Interruptor de dos estados. El estado lo posee el consumidor a través de `onChange`.
import { Switch } from '#LibComponents/react/atomic/switch/switch.component';defaultChecked={false}defaultChecked={true}disabled={true}<Switch label="Recibir ofertas" name="ofertas" onChange={fn} />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
className | string | no | — | |
defaultChecked | boolean | no | — | |
label | string | sí | — | |
name | string | sí | — | |
onChange | (field: StaticFields) => void | sí | — | |
position | string | no | — | |
tabIndex | number | no | — |
Ojo
- La vista previa lo monta con un wrapper que aporta el `onChange`: un island solo recibe props serializables.