|
8 | 8 | DialogDescription, |
9 | 9 | DialogFooter, |
10 | 10 | DialogHeader, |
| 11 | + DialogPanel, |
11 | 12 | DialogPopup, |
12 | 13 | DialogTitle, |
13 | 14 | } from "../ui/dialog"; |
@@ -90,43 +91,45 @@ export function AddUsageLimitSourceDialog({ |
90 | 91 | The key stays on the server. |
91 | 92 | </DialogDescription> |
92 | 93 | </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> |
130 | 133 | <DialogFooter variant="bare"> |
131 | 134 | <Button variant="outline" onClick={() => onOpenChange(false)}> |
132 | 135 | Cancel |
|
0 commit comments