1.8.0 • Published 2 years ago

@s-ui/react-form-checkboxes-with-parent v1.8.0

Weekly downloads
22
License
MIT
Repository
-
Last release
2 years ago

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 @s-ui/react-form-checkboxes-with-parent --save

Usage

Basic usage

import FormCheckboxesWithParent from '@s-ui/react-form-checkboxes-with-parent'

return (<FormCheckboxesWithParent />)

Add component styles to index.scss file:

@import '~@s-ui/react-form-checkboxes-with-parent/lib/index'

Find full description and more examples in the demo page.