import { useState } from 'react' import PropTypes from 'prop-types' import { FormControlLabel, Checkbox } from '@mui/material' export const CheckboxInput = ({ value, label, onChange, disabled = false }) => { const [myValue, setMyValue] = useState(value) return ( <> { setMyValue(event.target.checked) onChange(event.target.checked) }} /> } label={label} /> ) } CheckboxInput.propTypes = { value: PropTypes.bool, label: PropTypes.string, onChange: PropTypes.func, disabled: PropTypes.bool }