rc-hoho-checkbox
v1.0.3
Published
React Component Checkbox for web
Downloads
5
Readme
rc-hoho-checkbox
React Checkbox Component (web)
Screenshots
Usage
npm install rc-hoho-checkbox
import Checkbox from 'rc-hoho-checkbox';
constructor (props) {
super(props)
this.state = {
check1: true,
check2: true,
check3: false,
check4: true,
}
}
handleCheck1 = (e) => {
this.setState({
check1: e.target.checked,
})
}
<Checkbox onChange={this.handleCheck1} disabled={true} checked={check1} />
<Checkbox checked={check2}>hansin</Checkbox>
<Checkbox checked={check3} disabled={true} />
<Checkbox checked={check4} disabled={true} />
Development
npm i
npm start
Example
http://localhost:8000/examples/
install
API
checkbox props
| name | description | type | default | |----------|----------------|----------|--------------| |checked | default value | boolean | | |disabled | disabled | boolean | {} | |onChange | callback | function | | |className | className | String | '' |
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rc-hoho-checkbox is released under the MIT license.