Added textarea element
This commit is contained in:
parent
cbfe485490
commit
127e2679e9
|
|
@ -15,6 +15,8 @@ import {
|
||||||
SelectProps,
|
SelectProps,
|
||||||
TextInput,
|
TextInput,
|
||||||
TextInputProps,
|
TextInputProps,
|
||||||
|
Textarea,
|
||||||
|
TextareaProps,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { ReactNode } from "@tanstack/react-router";
|
import { ReactNode } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
|
@ -55,6 +57,10 @@ type CheckboxType = {
|
||||||
type: "checkbox";
|
type: "checkbox";
|
||||||
} & CheckboxProps;
|
} & CheckboxProps;
|
||||||
|
|
||||||
|
type TextareaType = {
|
||||||
|
type: "textarea";
|
||||||
|
} & TextareaProps;
|
||||||
|
|
||||||
type AcceptedInput = (
|
type AcceptedInput = (
|
||||||
| TextInputType
|
| TextInputType
|
||||||
| MultiSelectInputType
|
| MultiSelectInputType
|
||||||
|
|
@ -64,6 +70,7 @@ type AcceptedInput = (
|
||||||
| ChipType
|
| ChipType
|
||||||
| Group
|
| Group
|
||||||
| CheckboxType
|
| CheckboxType
|
||||||
|
| TextareaType
|
||||||
) &
|
) &
|
||||||
GeneralInputProps;
|
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