1.1.0 • Published 8 years ago
react-smart-checkbox v1.1.0
react-smart-checkbox
Installation:
- npm
npm i -P react-smart-checkbox- yarn
yarn add react-smart-checkboxHow to use:
- import component
import ReactSmartCheckbox from 'react-smart-checkbox'- use component
<ReactSmartCheckbox
name='fruits'
options={['orange', 'apple', 'banana']}
/>Read more below about component's additional attributes ↓
| attribute | type | required |
|---|---|---|
| name | string | true |
| options | array | true |
| initialValues | array | false |
| onChange | func | false |
- initialValues should pass array to check any child(s) on componentWillMount hook triggers
- onChange is callback function and returns checked childrens array