25 lines
986 B
JavaScript
25 lines
986 B
JavaScript
/* ============================================================
|
|
PageHeader.jsx — the one page-top pattern.
|
|
|
|
Every screen used to hand-write the same .page-head block, and the copies
|
|
drifted (a bare <h1> on Matching rendered in the wrong face entirely).
|
|
Emits the exact class structure the stylesheet already targets, so this is
|
|
markup dedup, not a redesign. `title`/`sub`/`actions` accept any node —
|
|
selects, buttons and status chips ride through unchanged.
|
|
============================================================ */
|
|
|
|
export default function PageHeader({ title, sub, crumb, actions }) {
|
|
return (
|
|
<>
|
|
{crumb && <div className="breadcrumb">{crumb}</div>}
|
|
<div className="page-head">
|
|
<div className="page-head-main">
|
|
<h1 className="page-title">{title}</h1>
|
|
{sub && <p className="page-sub">{sub}</p>}
|
|
</div>
|
|
{actions && <div className="page-head-actions">{actions}</div>}
|
|
</div>
|
|
</>
|
|
)
|
|
}
|