@propellerads/switch
v4.0.0
Published

Keywords
Readme
Switch
Install
yarn add @propellerads/switchornpm install @propellerads/switch --save
Usage
import Switch from '@propellerads/switch';
<Switch
isActive={true}
onChange={(next) => console.log('changed:', next)}
elementId="switch-id"
isDisabled={false}
containerClassName="my-root"
controlClassName="my-control"
/>;Props
- isActive (boolean, required): current switch value
- onChange (function, required): called with next
booleanvalue - elementId (string): id to link
inputandlabel - isDisabled (boolean, default: false): disables the control
- containerClassName (string): custom class for root container
- controlClassName (string): custom class for inner control
