mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-11 18:44:07 +00:00
WA-238 Add Checkbox form component
This commit is contained in:
parent
d9c05e3efc
commit
2609d30058
27
src/components/forms/Checkbox/index.jsx
Normal file
27
src/components/forms/Checkbox/index.jsx
Normal 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
|
Loading…
x
Reference in New Issue
Block a user