2018-01-30 11:53:12 -05:00
|
|
|
const classNames = require('classnames');
|
|
|
|
const FRCCheckbox = require('formsy-react-components').Checkbox;
|
|
|
|
const PropTypes = require('prop-types');
|
|
|
|
const React = require('react');
|
|
|
|
|
|
|
|
const defaultValidationHOC = require('./validations.jsx').defaultValidationHOC;
|
|
|
|
const inputHOC = require('./input-hoc.jsx');
|
2016-06-13 12:48:58 -04:00
|
|
|
|
|
|
|
require('./row.scss');
|
2016-06-23 07:27:43 -04:00
|
|
|
require('./checkbox.scss');
|
2016-05-12 17:42:04 -04:00
|
|
|
|
2018-01-30 11:53:12 -05:00
|
|
|
const Checkbox = props => (
|
|
|
|
<FRCCheckbox
|
|
|
|
rowClassName={classNames('checkbox-row', props.className)}
|
|
|
|
{...props}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
Checkbox.propTypes = {
|
2018-04-02 12:26:12 -04:00
|
|
|
className: PropTypes.string,
|
|
|
|
value: PropTypes.bool,
|
|
|
|
valueLabel: PropTypes.string
|
|
|
|
};
|
|
|
|
|
|
|
|
Checkbox.defaultProps = {
|
|
|
|
value: false,
|
|
|
|
valueLabel: ''
|
2018-01-30 11:53:12 -05:00
|
|
|
};
|
2016-05-12 17:42:04 -04:00
|
|
|
|
2016-06-13 12:48:58 -04:00
|
|
|
module.exports = inputHOC(defaultValidationHOC(Checkbox));
|