22 lines
844 B
TypeScript
22 lines
844 B
TypeScript
import type { ReactNode } from "react";
|
|
|
|
type AdminPageHeaderProps = {
|
|
eyebrow?: string;
|
|
title: string;
|
|
description?: string;
|
|
actions?: ReactNode;
|
|
};
|
|
|
|
export default function AdminPageHeader({ eyebrow = "Admin workspace", title, description, actions }: AdminPageHeaderProps) {
|
|
return (
|
|
<header className="mb-8 flex flex-col gap-4 border-b border-border pb-6 sm:flex-row sm:items-end sm:justify-between">
|
|
<div>
|
|
<p className="text-sm font-semibold uppercase tracking-[0.16em] text-brand-2">{eyebrow}</p>
|
|
<h1 className="mt-2 text-3xl font-semibold tracking-tight">{title}</h1>
|
|
{description ? <p className="mt-2 max-w-2xl text-sm text-muted-foreground">{description}</p> : null}
|
|
</div>
|
|
{actions ? <div className="flex shrink-0 items-center gap-2">{actions}</div> : null}
|
|
</header>
|
|
);
|
|
}
|