@easyguide/checkbox
v0.9.14
Published
Components checkbox ui
Downloads
6
Keywords
Readme
@easyguide/checkbox
Camponents checkbox ui
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