/** * * CustomInputCheckbox */ import React, { memo } from 'react'; import PropTypes from 'prop-types'; import { Label } from './components'; function CustomInputCheckbox({ entriesToDelete, isAll, name, onChange, value, }) { const shouldDisplaySomeChecked = isAll && entriesToDelete.length > 0 && !value; const shouldDisplayAllChecked = isAll && value; return ( ); } CustomInputCheckbox.defaultProps = { entriesToDelete: [], isAll: false, name: '', value: false, }; CustomInputCheckbox.propTypes = { entriesToDelete: PropTypes.array, isAll: PropTypes.bool, name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), onChange: PropTypes.func.isRequired, value: PropTypes.bool, }; export default memo(CustomInputCheckbox);