The best way to control Claude Code, Codex and more from any computer or phone

main
tsx 37 lines 1.41 KB
Raw
1 import type { ReactNode } from "react";
2
3 import { T3Wordmark } from "../T3Wordmark";
4
5 export function StandalonePage({ children }: { readonly children: ReactNode }) {
6 return (
7 // The page owns scrolling because root cannot scroll; safe centering keeps oversized cards top-aligned.
8 <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">
9 <section className="dialog-glass w-full max-w-xl rounded-2xl border p-6">{children}</section>
10 </div>
11 );
12 }
13
14 export function StandalonePageHeader({
15 context,
16 title,
17 description,
18 }: {
19 readonly context?: ReactNode;
20 readonly title: ReactNode;
21 readonly description: ReactNode;
22 }) {
23 return (
24 <>
25 <div className="flex items-baseline justify-between gap-3 text-muted-foreground">
26 <span className="flex items-baseline gap-1.5" role="img" aria-label="T3 Code">
27 <T3Wordmark className="h-3 w-auto shrink-0 text-foreground" aria-hidden />
28 {/* oxlint-disable-next-line t3code/no-untranslated-copy -- product wordmark */}
29 <span className="text-lg font-medium tracking-tight">Code</span>
30 </span>
31 {context ? <span className="text-sm">{context}</span> : null}
32 </div>
33 <h1 className="mt-6 text-xl leading-tight font-semibold">{title}</h1>
34 <p className="mt-2 text-sm text-muted-foreground">{description}</p>
35 </>
36 );
37 }