style(view): overlay compact top bar
This commit is contained in:
10
view/App.tsx
10
view/App.tsx
@@ -12,16 +12,14 @@ export function App({ app }: AppProps) {
|
||||
const zoomPercent = Math.round(state.editor.viewport.zoom * 100);
|
||||
|
||||
return (
|
||||
<main className="flex h-full flex-col bg-background text-foreground">
|
||||
<header className="flex h-12 items-center justify-between border-b px-4">
|
||||
<h1 className="font-semibold">Image Studio</h1>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
<main className="relative h-full bg-background text-foreground">
|
||||
<header className="pointer-events-none absolute inset-x-0 top-0 z-10 flex h-8 items-center justify-between px-3 text-white">
|
||||
<h1 className="text-sm font-medium">Image Studio</h1>
|
||||
<div className="text-xs">
|
||||
{state.document.name} · {zoomPercent}% · {state.editor.viewport.size.w}×{state.editor.viewport.size.h}
|
||||
</div>
|
||||
</header>
|
||||
<section className="min-h-0 flex-1 bg-muted">
|
||||
<CanvasViewport store={app.store} />
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user