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

Version Path
hippo-fw-0.9.7 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.6 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.5 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.4 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.3 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.2 client/hippo/components/form/fields/checkbox-wrapper.jsx
hippo-fw-0.9.1 client/hippo/components/form/fields/checkbox-wrapper.jsx