@ptadmin/toggle-switch
v1.0.27
Published
Simple boolean toggle component
Downloads
3
Keywords
Readme
ToggleSwitch
ToggleSwitch is a component that renders a toggle switch (on/off) that uses MaterialUI Toggle.
Usage
import ToggleSwitch from '@ptadmin/toggle-switch';
<ToggleSwitch />
Props
labelLeft (string): Label for the left (off) state of the switch
labelRight (string): Label for the right (on) state of the switch
toggle (boolean): Current state of the switch (on/off)
toggleAction (function ()): Function to switch the current state of the switch