device editor working with special caps
This commit is contained in:
1 parent
debe48f2b4
commit
1496bc66ad
7 files changed
+233
-34
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user