Sha256: 42497c3b6a8bd6c724c61e9707eb28fbdd6341318f02517b9eb8346d94876577
Contents?: true
Size: 651 Bytes
Versions: 7
Compression:
Stored size: 651 Bytes
Contents
import React from 'react'; import { observer } from 'mobx-react'; import { action } from 'mobx'; import CheckBox from 'grommet/components/CheckBox'; @observer export default class CheckBoxWrapper extends React.PureComponent { @action.bound onBlur(ev) { this.props.onBlur({ target: { value: ev.target.checked } }); } @action.bound onChange({ target: { checked: value } }) { this.props.onChange({ target: { value } }); } render() { return ( <CheckBox {...this.props} onChange={this.onChange} onBlur={this.onBlur} checked={!!this.props.value} /> ); } }
Version data entries
7 entries across 7 versions & 1 rubygems