@foundation-base/switches
v5.4.0
Published
Base switches component for foundation
Downloads
103
Readme
@foundation-base/switches
Base switches component for foundation
Install
npm install --save @foundation-base/switches
Props
type : string
The type
prop is to pass the type of the switch. It is either selected or success.
select : bool
The select
prop is to pass the initial state of the switch.
disabled : bool
The disabled
prop is pass the disabled state ( true or false ) of the switch.
onClick : func
This onClick
prop is an optional prop used to retrive the select state of the switch.
Example:
const sampleFunction = (e: any) => {
console.log(e.target.checked) // Prints the select state of the switch
}
<Switches type="selected" onClick={sampleFunction}>
You can add your own function and pass it through this prop.
License
MIT © lijoejohn