scratch-www/src/components/forms/checkbox.jsx

31 lines
747 B
React
Raw Normal View History

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');
require('./row.scss');
2016-06-23 07:27:43 -04:00
require('./checkbox.scss');
const Checkbox = props => (
<FRCCheckbox
rowClassName={classNames('checkbox-row', props.className)}
{...props}
/>
);
Checkbox.propTypes = {
className: PropTypes.string,
value: PropTypes.bool,
valueLabel: PropTypes.string
};
Checkbox.defaultProps = {
value: false,
valueLabel: ''
};
module.exports = inputHOC(defaultValidationHOC(Checkbox));