1 import PropTypes from 'prop-types';
2 import React from 'react';
4 import Icon from './Icon';
14 let clsn = className ? `${className} custom-check` : 'custom-check';
21 onBlur={onBlur ? () => onBlur({ target: { name, value } }) : null}
22 onClick={onChange ? () => onChange({ target: { name, value: !value } }) : null}
23 onKeyPress={onChange ? e => {
24 if (e.key == 'Enter' || e.key == ' ') {
27 onChange({ target: { name, value: !value } });
36 LargeCheck.propTypes = {
37 className: PropTypes.string,
39 name: PropTypes.string,
40 onBlur: PropTypes.func,
41 onChange: PropTypes.func,
42 value: PropTypes.bool,
45 LargeCheck.defaultProps = {
54 export default LargeCheck;