nd-rc-checkbox

1.0.0 • Public • Published

react-checkbox

Build Status Coverage Status npm bitHound Dev Dependencies bitHound Dev Dependencies bitHound Code bitHound Dev Dependencies bitHound Overall Score

React UI Component - checkbox

Install

$ npm install nd-rc-checkbox --save

Use

import React from 'react'
import Checkbox from 'nd-rc-checkbox'
import 'nd-rc-checkbox/assets/index.scss'
 
export default class extends React.Component {
 
  handleChange (value, e) {
    // [Object]: the event object
    console.log(e)
    // [Boolean]: true as checked, false as not
    console.log(value)
  }
 
  render () {
    // [Boolean]: default checked
    const checked = true
    // [Boolean]: disabled, true as disabled, false as not
    const disable = true
    // [String]: type, 'square' or 'circle', 'square' as default
    const type = 'circle'
 
    return (
      <div>
        <Checkbox disable={disable} onChange={this.handleChange}/>
        <Checkbox checked={checked} type={type} onChange={this.handleChange}/>
      </div>
    )
  }
}

Package Sidebar

Install

npm i nd-rc-checkbox

Weekly Downloads

14

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kagawa