Skip to content

Commit 0382894

Browse files
authored
Refactor JSON generator buttons layout for better alignment and consistency (#2106)
1 parent d71ef77 commit 0382894

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

frontend/src/app/json-editor/page.tsx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -328,25 +328,22 @@ export default function JSONGenerator() {
328328
<div className="w-1/2 p-4 bg-background overflow-y-auto">
329329
{validationAlert}
330330
<div className="relative">
331-
{/* Copy Button */}
332-
<Button
333-
className="absolute right-10 top-2"
334-
size="icon"
335-
variant="outline"
336-
onClick={handleCopy}
337-
>
338-
{isCopied ? <Check className="h-4 w-4" /> : <Clipboard className="h-4 w-4" />}
339-
</Button>
340-
341-
{/* Download Button */}
342-
<Button
343-
className="absolute right-2 top-2"
344-
size="icon"
345-
variant="outline"
346-
onClick={handleDownload}
347-
>
348-
<Download className="h-4 w-4" />
349-
</Button>
331+
<div className="absolute right-2 top-2 flex gap-1">
332+
<Button
333+
size="icon"
334+
variant="outline"
335+
onClick={handleCopy}
336+
>
337+
{isCopied ? <Check className="h-4 w-4" /> : <Clipboard className="h-4 w-4" />}
338+
</Button>
339+
<Button
340+
size="icon"
341+
variant="outline"
342+
onClick={handleDownload}
343+
>
344+
<Download className="h-4 w-4" />
345+
</Button>
346+
</div>
350347

351348
<pre className="mt-4 p-4 bg-secondary rounded shadow overflow-x-scroll">
352349
{JSON.stringify(script, null, 2)}

0 commit comments

Comments
 (0)