feat(env): allow multi-line env var values via auto-growing textarea

Replace the plain-value <input> with the shadcn Textarea (which has
field-sizing: content baked in). Starts at rows={1}, grows as content
needs more vertical space. Storage and runtime already preserve newlines
so this is purely a UI capability change.
This commit is contained in:
2026-05-02 07:15:08 -04:00
parent bf1abb1492
commit 441bbd5b9a
+4 -2
View File
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from "react";
import type { CompanySecret, EnvBinding } from "@paperclipai/shared"; import type { CompanySecret, EnvBinding } from "@paperclipai/shared";
import { X } from "lucide-react"; import { X } from "lucide-react";
import { cn } from "../lib/utils"; import { cn } from "../lib/utils";
import { Textarea } from "./ui/textarea";
const inputClass = const inputClass =
"w-full rounded-md border border-border px-2.5 py-1.5 bg-transparent outline-none text-sm font-mono placeholder:text-muted-foreground/40"; "w-full rounded-md border border-border px-2.5 py-1.5 bg-transparent outline-none text-sm font-mono placeholder:text-muted-foreground/40";
@@ -212,8 +213,9 @@ export function EnvVarEditor({
</> </>
) : ( ) : (
<> <>
<input <Textarea
className={cn(inputClass, "flex-[3]")} rows={1}
className={cn(inputClass, "flex-[3] min-h-0 resize-none shadow-none")}
placeholder="value" placeholder="value"
value={row.plainValue} value={row.plainValue}
onChange={(event) => updateRow(index, { plainValue: event.target.value })} onChange={(event) => updateRow(index, { plainValue: event.target.value })}