device editor working with special caps

This commit is contained in:
ari committed 2022-06-18 23:23:08 -04:00
1 parent debe48f2b4
commit 1496bc66ad
7 files changed
+233 -34

No files matched your search

+22 -5
View File
@@ -1,6 +1,6 @@
import Checkbox from "@mui/material/Checkbox";
import FormGroup from '@mui/material/FormGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormGroup from "@mui/material/FormGroup";
import FormControlLabel from "@mui/material/FormControlLabel";
export interface Props {
label: string;
@@ -8,6 +8,8 @@ export interface Props {
onChange: (v: boolean) => void;
disabled?: boolean;
className?: string;
required?: boolean;
placeholder?: string;
}
export default function InputBoolean({
label,
@@ -15,8 +17,23 @@ export default function InputBoolean({
onChange,
disabled = false,
className,
required,
placeholder,
}: Props) {
return <FormGroup className={className}>
<FormControlLabel disabled={disabled} control={<Checkbox checked={value} onChange={() => onChange(!value)} />} label={label} />
</FormGroup>
return (
<FormGroup className={className}>
<FormControlLabel
disabled={disabled}
control={
<Checkbox
checked={value}
onChange={() => onChange(!value)}
required={required}
placeholder={placeholder}
/>
}
label={label}
/>
</FormGroup>
);
}