Added checkbox element
This commit is contained in:
parent
277391766d
commit
cbfe485490
|
|
@ -1,4 +1,6 @@
|
||||||
import {
|
import {
|
||||||
|
Checkbox,
|
||||||
|
CheckboxProps,
|
||||||
Chip,
|
Chip,
|
||||||
ChipProps,
|
ChipProps,
|
||||||
Fieldset,
|
Fieldset,
|
||||||
|
|
@ -49,6 +51,10 @@ type ChipType = {
|
||||||
type: "chip";
|
type: "chip";
|
||||||
} & Omit<ChipProps, "type">;
|
} & Omit<ChipProps, "type">;
|
||||||
|
|
||||||
|
type CheckboxType = {
|
||||||
|
type: "checkbox";
|
||||||
|
} & CheckboxProps;
|
||||||
|
|
||||||
type AcceptedInput = (
|
type AcceptedInput = (
|
||||||
| TextInputType
|
| TextInputType
|
||||||
| MultiSelectInputType
|
| MultiSelectInputType
|
||||||
|
|
@ -57,6 +63,7 @@ type AcceptedInput = (
|
||||||
| SelectType
|
| SelectType
|
||||||
| ChipType
|
| ChipType
|
||||||
| Group
|
| Group
|
||||||
|
| CheckboxType
|
||||||
) &
|
) &
|
||||||
GeneralInputProps;
|
GeneralInputProps;
|
||||||
|
|
||||||
|
|
@ -135,6 +142,16 @@ function createInputComponents(options: Options) {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "checkbox": {
|
||||||
|
return (
|
||||||
|
<Checkbox
|
||||||
|
{...input}
|
||||||
|
readOnly={options.readonlyAll || input.readOnly}
|
||||||
|
disabled={options.disableAll || input.disabled}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user