22 lines
603 B
TypeScript
22 lines
603 B
TypeScript
import type { AppRoute } from '../routes';
|
|
import { pageMeta } from '../pageMeta';
|
|
|
|
type PageHeaderProps = {
|
|
route: AppRoute;
|
|
action?: React.ReactNode;
|
|
};
|
|
|
|
export function PageHeader({ route, action }: PageHeaderProps) {
|
|
const meta = pageMeta[route];
|
|
|
|
return (
|
|
<div className={`mb-7 ${action ? 'flex flex-wrap items-end justify-between gap-4' : ''}`}>
|
|
<div>
|
|
<h1 className="text-[24px] font-black tracking-[0] text-[#0f172a]">{meta.title}</h1>
|
|
<p className="mt-2 text-[13px] font-bold text-[#64748b]">{meta.description}</p>
|
|
</div>
|
|
{action}
|
|
</div>
|
|
);
|
|
}
|