WA-238 Add Checkbox form component

This commit is contained in:
apanizo 2018-06-07 13:28:53 +02:00
parent d9c05e3efc
commit 2609d30058
1 changed files with 27 additions and 0 deletions

View File

@ -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