Skip to content

Commit 0786184

Browse files
fix(web): compose the add-hub dialog body with DialogPanel
The form hand-rolled its padding, which also skipped the panel's scroll area, scroll fade, and the header-spacing rule keyed on data-slot="dialog-panel". Wrap it in DialogPanel like the other dialogs. Co-Authored-By: Claude Code <[email protected]>
1 parent 0d569ce commit 0786184

1 file changed

Lines changed: 40 additions & 37 deletions

File tree

‎apps/web/src/components/usage/AddUsageLimitSourceDialog.tsx‎

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
DialogDescription,
99
DialogFooter,
1010
DialogHeader,
11+
DialogPanel,
1112
DialogPopup,
1213
DialogTitle,
1314
} from "../ui/dialog";
@@ -90,43 +91,45 @@ export function AddUsageLimitSourceDialog({
9091
The key stays on the server.
9192
</DialogDescription>
9293
</DialogHeader>
93-
<form
94-
className="grid gap-4 px-6 py-5"
95-
onSubmit={(event) => {
96-
event.preventDefault();
97-
save();
98-
}}
99-
>
100-
<div className="grid gap-1.5">
101-
<Label htmlFor="usage-source-url">Hub URL</Label>
102-
<Input
103-
id="usage-source-url"
104-
placeholder="https://hub.example.ts.net:8318"
105-
value={url}
106-
onChange={(event) => setUrl(event.target.value)}
107-
autoFocus
108-
/>
109-
</div>
110-
<div className="grid gap-1.5">
111-
<Label htmlFor="usage-source-key">Management key</Label>
112-
<Input
113-
id="usage-source-key"
114-
type="password"
115-
autoComplete="off"
116-
value={managementKey}
117-
onChange={(event) => setManagementKey(event.target.value)}
118-
/>
119-
</div>
120-
<div className="grid gap-1.5">
121-
<Label htmlFor="usage-source-label">Label (optional)</Label>
122-
<Input
123-
id="usage-source-label"
124-
placeholder="Defaults to the hub's host name"
125-
value={label}
126-
onChange={(event) => setLabel(event.target.value)}
127-
/>
128-
</div>
129-
</form>
94+
<DialogPanel>
95+
<form
96+
className="grid gap-4"
97+
onSubmit={(event) => {
98+
event.preventDefault();
99+
save();
100+
}}
101+
>
102+
<div className="grid gap-1.5">
103+
<Label htmlFor="usage-source-url">Hub URL</Label>
104+
<Input
105+
id="usage-source-url"
106+
placeholder="https://hub.example.ts.net:8318"
107+
value={url}
108+
onChange={(event) => setUrl(event.target.value)}
109+
autoFocus
110+
/>
111+
</div>
112+
<div className="grid gap-1.5">
113+
<Label htmlFor="usage-source-key">Management key</Label>
114+
<Input
115+
id="usage-source-key"
116+
type="password"
117+
autoComplete="off"
118+
value={managementKey}
119+
onChange={(event) => setManagementKey(event.target.value)}
120+
/>
121+
</div>
122+
<div className="grid gap-1.5">
123+
<Label htmlFor="usage-source-label">Label (optional)</Label>
124+
<Input
125+
id="usage-source-label"
126+
placeholder="Defaults to the hub's host name"
127+
value={label}
128+
onChange={(event) => setLabel(event.target.value)}
129+
/>
130+
</div>
131+
</form>
132+
</DialogPanel>
130133
<DialogFooter variant="bare">
131134
<Button variant="outline" onClick={() => onOpenChange(false)}>
132135
Cancel

0 commit comments

Comments
 (0)