20 lines
487 B
TypeScript
20 lines
487 B
TypeScript
|
|
interface HeaderProps {
|
||
|
|
title: string;
|
||
|
|
description?: string;
|
||
|
|
action?: React.ReactNode;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function Header({ title, description, action }: HeaderProps) {
|
||
|
|
return (
|
||
|
|
<div className="flex items-center justify-between">
|
||
|
|
<div>
|
||
|
|
<h2 className="text-3xl font-bold tracking-tight">{title}</h2>
|
||
|
|
{description && (
|
||
|
|
<p className="text-muted-foreground">{description}</p>
|
||
|
|
)}
|
||
|
|
</div>
|
||
|
|
{action && <div>{action}</div>}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|