1.1.1 • Published 5 years ago

use-checkbox v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Hooks for checkbox

How use?

The checkboxes options is based in an array of objects, and at each object the key and checked propriety is required.

See the example.

const options = [
  {
    key: 'bacon',
    label: 'Bacon',
    checked: true
  },
  {
    key: 'apple',
    label: 'Apple',
    checked: false
  }
]

const {checkboxes, setChecked} = useCheckbox(options)

Demo

Edit Checkbox

License

MIT © Guilherme Bayer