@easyguide/checkbox

0.9.14 • Public • Published

@easyguide/checkbox

Camponents checkbox ui

NPM JavaScript Style Guide

Install

npm install --save @easyguide/checkbox

Usage simple checkbox

import React from 'react'
import Checkbox from '@easyguide/checkbox'

class Example extends Component {
  render() {
    const items = [
      {value: 1, label: 'IPCA'},
      {value: 2, label: 'CDI'},
      {value: 3, label: 'PRÉ'},
    ]

    return (
      <Checkbox
        label="Tipo de rentabilidade"
        items={items}
        onChange={value => console.log(value)}
      />
    )
  }
}

Usage checkbox with selected values

import React from 'react'
import Checkbox from '@easyguide/checkbox'

class Example extends Component {
  render() {
    const items = [
      {value: 1, label: 'IPCA'},
      {value: 2, label: 'CDI'},
      {value: 3, label: 'PRÉ'},
    ]

    return (
      <Checkbox
        label="Tipo de rentabilidade"
        items={items}
        value={[1, 3]}
        onChange={value => console.log(value)}
      />
    )
  }
}

License

MIT © iamtchelo

Readme

Keywords

none

Package Sidebar

Install

npm i @easyguide/checkbox

Weekly Downloads

2

Version

0.9.14

License

MIT

Unpacked Size

12.2 kB

Total Files

7

Last publish

Collaborators

  • celso-henrique
  • wellyal
  • guilhermegregio
  • rafaellucio
  • iamtchelo
  • danicastilho