Switcher

Props

NameTypeDescription
childrenReact.ReactNodeLabel content
isDisabledbooleanIn 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
themePartialGlobalDefaultTheme[ typeof COMPONENTS_NAMESPACES.switcher ]...
valuebooleanThe value
_[className]
[x: string]: unknown
E.g.: _w-48 adds a css class w-48 to the component's outer wrapper.

<L.Switcher
  onChange={({ component }) => console.log(component.value)}
>
  Click me
</L.Switcher>
  

Validation

NameTypeDescription
form
string
Form name
name
string
Component name