1.3.0 • Published 4 years ago
@schibstedspain/form-checkboxes-with-parent v1.3.0
FormCheckboxesWithParent
Component to show a list of checkboxes with parent checkbox.
Context
- Parent will be checked when all children are.
- When a child is not checked, the parent neither.
- On check parent all children will be checked (or unchecked, depending on parent status).
Installation
$ npm install @schibstedspain/form-checkboxes-with-parent --save
Usage
Basic usage
import FormCheckboxesWithParent from '@schibstedspain/form-checkboxes-with-parent'
return (<FormCheckboxesWithParent />)
Add component styles to index.scss file:
@import '~@schibstedspain/form-checkboxes-with-parent/lib/index'
Find full description and more examples in the demo page.