npm install react-shnyaga
import React from 'react';
import Shnyaga from 'react-shnyaga';
import 'react-shnyaga/src/styles.css';
React.render(<Shnyaga />, document.getElementById('root'));
The component takes the following props.
name | type | default | description |
---|---|---|---|
checked | Boolean | false | whether switch is checked |
disabled | Boolean | false | switch is disabled |
offColor | Color | #e6e6e6 | `Off` background color |
onColor | Color | #468cff | `On` background color |
className | String | custom class name | |
size | String | normal | Switch size (default: normal) |
onClick | Function | () => ({}) | called when switch is clicked |
- E-Mail hello@archakov.im
- Website https://archakov.im
Now licensed under the MIT License: http://deuxhuithuit.mit-license.org