checkbox-group-react

Made with create-react-library


License
MIT
Install
npm install checkbox-group-react@1.0.0

Documentation

checkbox-group-react

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save checkbox-group-react

Usage

import React, { Component } from 'react'

import CheckBoxGroup from 'checkbox-group-react'

const checkboxOptions = [{label: 'Option 1'}, {label: 'Option 2'}, {label: 'Option 3'}, {label: 'Option 4'}]

const handleOptionsChecked = (checkedOptions) => {
  console.log(checkedOptions); // returns an array of selected options
}

class Example extends Component {
  render() {
    return <CheckBoxGroup options={checkboxOptions} onOptionsChecked={handleOptionsChecked} />
  }
}

Props

Props Required type return
options yes [{label: 'option'}] null
onOptionsChecked yes function array of string with selected options
initialOptionsLength optional number null
category optional string null
categoryClassname optional string null
showMore optional boolean -

License

MIT © https://github.com/sakthi2995

checkbox-group-react