WA-238 Add Checkbox form component
This commit is contained in:
parent
d9c05e3efc
commit
2609d30058
|
@ -0,0 +1,27 @@
|
|||
// @flow
|
||||
import React from 'react'
|
||||
import Checkbox, { type CheckoxProps } from 'material-ui/Checkbox'
|
||||
|
||||
class GnoCheckbox extends React.PureComponent<CheckoxProps> {
|
||||
render() {
|
||||
const {
|
||||
input: {
|
||||
checked, name, onChange, ...restInput
|
||||
},
|
||||
meta,
|
||||
...rest
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<Checkbox
|
||||
{...rest}
|
||||
name={name}
|
||||
inputProps={restInput}
|
||||
onChange={onChange}
|
||||
checked={!!checked}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default GnoCheckbox
|
Loading…
Reference in New Issue