Switcher
Props
Name | Type | Description |
---|---|---|
children | React.ReactNode | Label content |
isDisabled | boolean | In case you want to disable the component |
onChange | (event: ChangeEvent) => void
===
interface ChangeEvent extends React.MouseEvent<HTMLDivElement> {
component: {
name?: string,
value: boolean,
},
}
| Change handler |
onClick | (ev: React.MouseEvent<HTMLDivElement>) => void, | Handlers drag handler |
shouldRender | boolean | Pass false if you don't want the component to appear |
theme | PartialGlobalDefaultTheme[ typeof COMPONENTS_NAMESPACES.switcher ] | ... |
value | boolean | The value |
_[className] | [x: string]: unknown | E.g.: _w-48 adds a css class w-48 to the component's outer wrapper. |
() => { return ( <L.Switcher onChange={({ component }) => log(component.value)} > Click me </L.Switcher> ) }
Validation components' props
Name | Type | Description |
---|---|---|
form | string | Form name |
name | string | Component name |