import { Checkbox, FormControlLabel, Typography } from "@mui/material";
export function PropCheckbox(p: {
editable: boolean;
label: string;
checked: boolean | undefined;
onValueChange: (v: boolean) => void;
checkboxAlwaysVisible?: boolean;
}): React.ReactElement {
if (!p.checkboxAlwaysVisible) {
if (!p.editable && p.checked)
return {p.label};
if (!p.editable) return <>>;
}
return (
p.onValueChange(e.target.checked)}
/>
}
label={p.label}
/>
);
}