Skip to content

Commit 523a0b5

Browse files
committed
feat: add textarea for dynamic parameters
1 parent 33a0102 commit 523a0b5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

site/src/modules/workspaces/DynamicParameter/DynamicParameter.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
} from "components/Select/Select";
2525
import { Slider } from "components/Slider/Slider";
2626
import { Switch } from "components/Switch/Switch";
27+
import { Textarea } from "components/Textarea/Textarea";
2728
import {
2829
Tooltip,
2930
TooltipContent,
@@ -301,6 +302,18 @@ const ParameterField: FC<ParameterFieldProps> = ({
301302
/>
302303
);
303304

305+
case "textarea":
306+
return (
307+
<Textarea
308+
defaultValue={defaultValue}
309+
onChange={(e) => onChange(e.target.value)}
310+
disabled={disabled}
311+
placeholder={
312+
(parameter.styling as { placeholder?: string })?.placeholder
313+
}
314+
/>
315+
);
316+
304317
case "input": {
305318
const inputType = parameter.type === "number" ? "number" : "text";
306319
const inputProps: Record<string, unknown> = {};

0 commit comments

Comments
 (0)