Skip to content

Commit fb247ca

Browse files
committed
WIP
1 parent 49ff33a commit fb247ca

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/components/databrowser/components/display/display-list-edit.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ const ListEditForm = ({
8080

8181
return (
8282
<FormProvider {...form}>
83-
<form onSubmit={onSubmit} className="flex flex-col gap-2">
83+
<form onSubmit={onSubmit} className="flex h-full flex-col gap-2">
8484
<div className="flex grow flex-col gap-2">
8585
{type !== "list" && (
8686
<FormItem
8787
readOnly={type === "stream"}
8888
name="key"
89-
height={type === "set" ? 250 : 100}
89+
// height={type === "set" ? 250 : 100}
9090
label={keyLabel}
9191
data={itemKey}
9292
/>
@@ -99,7 +99,7 @@ const ListEditForm = ({
9999
<FormItem
100100
readOnly={type === "stream"}
101101
name="value"
102-
height={type === "list" ? 250 : 100}
102+
// height={type === "list" ? undefined : 100}
103103
label={valueLabel}
104104
data={itemValue ?? ""}
105105
/>
@@ -195,14 +195,19 @@ const FormItem = ({
195195
})
196196

197197
return (
198-
<div className="flex flex-col gap-1">
198+
<div className={cn("flex flex-col gap-1", !height && "h-full")}>
199199
<div className="flex items-center gap-1 text-xs">
200200
<span className="font-medium text-zinc-700">{label}</span>{" "}
201201
<span className="text-zinc-300">/</span>
202202
{selector}
203203
</div>
204204

205-
<div className="overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm">
205+
<div
206+
className={cn(
207+
"overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm",
208+
!height && "h-full"
209+
)}
210+
>
206211
{editor}
207212
</div>
208213
</div>

src/components/databrowser/components/display/display-simple.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const EditorDisplayForm = ({
6363
{type === "json" ? <div /> : selector}
6464
</div>
6565

66-
<div className="grow rounded-md border border-zinc-300 bg-white p-1">{editor}</div>
66+
<div className="grow rounded-md border border-zinc-300 bg-white p-2">{editor}</div>
6767
</div>
6868

6969
<div className="flex shrink-0 items-center gap-2">

src/components/databrowser/components/display/input/custom-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const CustomEditor = ({
7474

7575
return (
7676
<div
77-
className={cn("group/editor relative", height === undefined && "h-full p-2")}
77+
className={cn("group/editor relative", height === undefined && "h-full")}
7878
style={{ height: height }}
7979
>
8080
{isTest ? (

0 commit comments

Comments
 (0)