Skip to content

Free open-source image editor for the browser

Compact editor footer

Rodrigoa7ff89c3702d
diff --git a/src/app/editor/export/export-button.tsx b/src/app/editor/export/export-button.tsx
index fb9a5d0..20582e6 100644
--- a/src/app/editor/export/export-button.tsx
+++ b/src/app/editor/export/export-button.tsx
@@ -5,8 +5,23 @@ import { ExportSettings } from "./export-settings";
export function ExportButton() {
const dialog = useRef<HTMLDialogElement>(null);
return (
- <section className="shrink-0 p-4">
- <Button className="w-full" onClick={() => dialog.current?.showModal()}>
+ <div className="ml-auto">
+ <Button
+ className="flex h-8 items-center gap-2 rounded-md px-3 py-0 text-xs"
+ onClick={() => dialog.current?.showModal()}
+ >
+ <svg
+ aria-hidden="true"
+ viewBox="0 0 20 20"
+ className="size-3.5"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M10 2v10m-4-4 4 4 4-4M3 12v5h14v-5" />
+ </svg>
Export
</Button>
<dialog
@@ -16,6 +31,6 @@ export function ExportButton() {
>
<ExportSettings onClose={() => dialog.current?.close()} />
</dialog>
- </section>
+ </div>
);
}
diff --git a/src/app/editor/history.tsx b/src/app/editor/history.tsx
index 00f18de..66ad4da 100644
--- a/src/app/editor/history.tsx
+++ b/src/app/editor/history.tsx
@@ -34,23 +34,49 @@ export function HistoryControls() {
return () => window.removeEventListener("keydown", keyDown);
}, [history]);
return (
- <div className="flex gap-2 px-4 pt-3">
+ <fieldset aria-label="History" className="flex items-center gap-0.5">
<Button
variant="ghost"
- className="disabled:pointer-events-none disabled:opacity-40"
+ className="flex size-8 items-center justify-center rounded-md p-0 disabled:pointer-events-none disabled:opacity-25"
+ aria-label="Undo"
+ title="Undo (Ctrl/⌘ Z)"
disabled={!undoCount}
onClick={history.undo}
>
- Undo
+ <svg
+ aria-hidden="true"
+ viewBox="0 0 20 20"
+ className="size-4"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="m7 4-4 4 4 4M3 8h8a5 5 0 0 1 0 10" />
+ </svg>
</Button>
<Button
variant="ghost"
- className="disabled:pointer-events-none disabled:opacity-40"
+ className="flex size-8 items-center justify-center rounded-md p-0 disabled:pointer-events-none disabled:opacity-25"
+ aria-label="Redo"
+ title="Redo (Ctrl/⌘ Shift Z)"
disabled={!redoCount}
onClick={history.redo}
>
- Redo
+ <svg
+ aria-hidden="true"
+ viewBox="0 0 20 20"
+ className="size-4"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="m13 4 4 4-4 4m4-4H9a5 5 0 0 0 0 10" />
+ </svg>
</Button>
- </div>
+ </fieldset>
);
}
diff --git a/src/app/editor/sidebar/index.tsx b/src/app/editor/sidebar/index.tsx
index 9fa7b2d..64c9b85 100644
--- a/src/app/editor/sidebar/index.tsx
+++ b/src/app/editor/sidebar/index.tsx
@@ -69,8 +69,10 @@ export function Sidebar() {
<AdjustmentControls />
<ToneCurvesPanel histogram={histogram} />
</div>
- <HistoryControls />
- <ExportButton />
+ <div className="flex shrink-0 items-center gap-2 bg-neutral-900 px-2 py-1.5">
+ <HistoryControls />
+ <ExportButton />
+ </div>
</div>
</ResizablePanel>
);