20 lines
525 B
TypeScript
20 lines
525 B
TypeScript
|
|
import React from 'react';
|
||
|
|
|
||
|
|
interface PageHeaderProps {
|
||
|
|
title: string;
|
||
|
|
description?: string;
|
||
|
|
action?: React.ReactNode;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function PageHeader({ title, description, action }: PageHeaderProps) {
|
||
|
|
return (
|
||
|
|
<div className="flex items-start justify-between mb-6">
|
||
|
|
<div>
|
||
|
|
<h1 className="text-2xl font-bold text-white tracking-tight">{title}</h1>
|
||
|
|
{description && <p className="text-gray-500 text-sm mt-1">{description}</p>}
|
||
|
|
</div>
|
||
|
|
{action && <div>{action}</div>}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|