react-heart-checkbox

0.0.4 • Public • Published

react-heart-checkbox

Build Status

React heart checkbox - Online Demo

Usage

$ yarn add react-heart-checkbox
$ npm install -S react-heart-checkbox
import HeartCheckbox from 'react-heart-checkbox';
 
class Demo extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      checked: false
    };
  }
 
  onClick = (evnet, props) => {
    this.setState({ checked: !this.state.checked });
  }
 
  render() {
    const { checked } = this.state;
 
    return (
      <>
        <h1>{checked ? 'checked' : 'unchecked'}</h1>
        <HeartCheckbox checked={checked} onClick={this.onClick} />
      </>
    );
  }
}
 
render(<Demo />, document.getElementById("app"));

Package Sidebar

Install

npm i react-heart-checkbox

Weekly Downloads

7

Version

0.0.4

License

MIT

Unpacked Size

279 kB

Total Files

6

Last publish

Collaborators

  • sabertazimi