import React, { useRef } from 'react'; import PropTypes from 'prop-types'; import Icon from 'components/common/Icon'; import Check from 'assets/check.svg'; import styles from './Checkbox.module.css'; function Checkbox({ name, value, label, onChange }) { const ref = useRef(); const onClick = () => ref.current.click(); return (
{value && } size="small" />}
); } Checkbox.propTypes = { name: PropTypes.string, value: PropTypes.any, label: PropTypes.node, onChange: PropTypes.func, }; export default Checkbox;