Added textarea element
This commit is contained in:
parent
cbfe485490
commit
127e2679e9
|
|
@ -15,6 +15,8 @@ import {
|
|||
SelectProps,
|
||||
TextInput,
|
||||
TextInputProps,
|
||||
Textarea,
|
||||
TextareaProps,
|
||||
} from "@mantine/core";
|
||||
import { ReactNode } from "@tanstack/react-router";
|
||||
|
||||
|
|
@ -55,6 +57,10 @@ type CheckboxType = {
|
|||
type: "checkbox";
|
||||
} & CheckboxProps;
|
||||
|
||||
type TextareaType = {
|
||||
type: "textarea";
|
||||
} & TextareaProps;
|
||||
|
||||
type AcceptedInput = (
|
||||
| TextInputType
|
||||
| MultiSelectInputType
|
||||
|
|
@ -64,6 +70,7 @@ type AcceptedInput = (
|
|||
| ChipType
|
||||
| Group
|
||||
| CheckboxType
|
||||
| TextareaType
|
||||
) &
|
||||
GeneralInputProps;
|
||||
|
||||
|
|
@ -152,6 +159,16 @@ function createInputComponents(options: Options) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
case "textarea": {
|
||||
return (
|
||||
<Textarea
|
||||
{...input}
|
||||
readOnly={options.readonlyAll || input.readOnly}
|
||||
disabled={options.disableAll || input.disabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user