@foundation-base/switches
TypeScript icon, indicating that this package has built-in type declarations

5.4.0 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @foundation-base/switches

Weekly Downloads

29

Version

5.4.0

License

MIT

Unpacked Size

281 kB

Total Files

12

Last publish

Collaborators

  • unplatformsdeveloper