import { ChevronLeftIcon } from 'lucide-react'; import { Link } from '#/components/atoms/link.jsx'; import { MEASURE } from '#/lib/layout.js'; import { cn } from '#/lib/utils.js'; /** * What a detail screen is about, fixed above its body: the title, one line * of facts under it, and the one action on the right. A * pull request, a commit, an issue and a run all open on this, so a reader * meets one heading at one size wherever they land. * * The heading sits in the reading column unless `wide`, for a screen whose * body takes the window. `rule` closes it with a rule, drawn to the column * or, wide, to the window. `back` names where the reader came from, on a line * above the title, for a page whose parent is not the section tab: a commit * reached from a pull request, a form. `meta` is the line under the title: * who, when, which sha. `children` is anything else the head carries, such * as the tabs a pull request opens on. * @param {{title: import('react').ReactNode, back?: {href: string, label: string}, meta?: import('react').ReactNode, actions?: import('react').ReactNode, wide?: boolean, rule?: boolean, className?: string, children?: import('react').ReactNode}} props */ export function PageHead({ title, back, meta, actions, wide = false, rule = false, className, children, }) { return (