26 lines
736 B
TypeScript
26 lines
736 B
TypeScript
|
|
import { HelpLink } from "./help-link";
|
||
|
|
|
||
|
|
interface PageHeaderProps {
|
||
|
|
title: string;
|
||
|
|
description?: string;
|
||
|
|
action?: React.ReactNode;
|
||
|
|
helpTopic?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function PageHeader({ title, description, action, helpTopic }: PageHeaderProps) {
|
||
|
|
return (
|
||
|
|
<div className="flex items-start justify-between">
|
||
|
|
<div>
|
||
|
|
<h1 className="text-2xl font-bold text-gray-900 dark:text-neutral-100">{title}</h1>
|
||
|
|
{description && (
|
||
|
|
<p className="text-sm text-gray-500 dark:text-neutral-400 mt-1">{description}</p>
|
||
|
|
)}
|
||
|
|
</div>
|
||
|
|
<div className="flex items-center gap-2">
|
||
|
|
{action ? <div>{action}</div> : null}
|
||
|
|
<HelpLink topicOverride={helpTopic} />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|