import H1 from "@/src/components/twui/layout/H1"; import Link from "@/src/components/twui/layout/Link"; import P from "@/src/components/twui/layout/P"; import Row from "@/src/components/twui/layout/Row"; import Stack from "@/src/components/twui/layout/Stack"; import { ArrowLeft } from "lucide-react"; import type { ReactNode } from "react"; import type { ActionMenuItem } from "../action-menu/types"; import PageHeaderActions from "./page-header-actions"; type Props = { title: ReactNode; description?: ReactNode; /** Inline status line under the title (status dots, mono values) */ meta?: ReactNode; primary_action?: ActionMenuItem; actions?: ActionMenuItem[]; back?: { href: string; title: string }; /** Rendered under the title row, e.g. a `SubNav` */ nav?: ReactNode; }; export default function PageHeader({ title, description, meta, primary_action, actions, back, nav, }: Props) { return ( {back ? ( {back.title} ) : null}

{title}

{description ? ( typeof description == "string" ? (

{description}

) : ( description ) ) : null} {meta ? {meta} : null}
{nav ?
{nav}
: null}
); }