enabled flag
This commit is contained in:
1 parent
e3a816f2c8
commit
b30f4ed59a
7 files changed
+45
-5
No files matched your search
@@ -7,14 +7,16 @@ export interface Props {
|
||||
value: boolean;
|
||||
onChange: (v: boolean) => void;
|
||||
disabled?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
export default function InputBoolean({
|
||||
label,
|
||||
value = false,
|
||||
onChange,
|
||||
disabled = false,
|
||||
className,
|
||||
}: Props) {
|
||||
return <FormGroup>
|
||||
return <FormGroup className={className}>
|
||||
<FormControlLabel disabled={disabled} control={<Checkbox checked={value} onChange={() => onChange(!value)} />} label={label} />
|
||||
</FormGroup>
|
||||
}
|
||||
Reference in new issue
Block a user