mirror of
https://github.com/hanzoai/dev.git
synced 2026-11-21 14:22:49 +00:00
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import type { ReactNode } from "react";
|
|
|
|
import { Wordmark } from "../Wordmark";
|
|
|
|
export function StandalonePage({ children }: { readonly children: ReactNode }) {
|
|
return (
|
|
// The page owns scrolling because root cannot scroll; safe centering keeps oversized cards top-aligned.
|
|
<div className="flex h-full items-center-safe justify-center overflow-y-auto scrollbar-gutter-both bg-background px-4 py-10 text-foreground sm:px-6">
|
|
<section className="dialog-glass w-full max-w-xl rounded-2xl border p-6">{children}</section>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function StandalonePageHeader({
|
|
context,
|
|
title,
|
|
description,
|
|
}: {
|
|
readonly context?: ReactNode;
|
|
readonly title: ReactNode;
|
|
readonly description: ReactNode;
|
|
}) {
|
|
return (
|
|
<>
|
|
<div className="flex items-baseline justify-between gap-3 text-muted-foreground">
|
|
<span className="flex items-baseline gap-1.5" role="img" aria-label="Hanzo Dev">
|
|
<Wordmark className="h-3.5 w-auto shrink-0 text-foreground" aria-hidden />
|
|
<span className="text-lg font-semibold tracking-tight">Hanzo Dev</span>
|
|
</span>
|
|
{context ? <span className="text-sm">{context}</span> : null}
|
|
</div>
|
|
<h1 className="mt-6 text-xl leading-tight font-semibold">{title}</h1>
|
|
<p className="mt-2 text-sm text-muted-foreground">{description}</p>
|
|
</>
|
|
);
|
|
}
|