20 lines
615 B
TypeScript
20 lines
615 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
type PageHeaderProps = {
|
|
title: string;
|
|
description?: string;
|
|
actions?: ReactNode;
|
|
};
|
|
|
|
export function PageHeader({ title, description, actions }: PageHeaderProps) {
|
|
return (
|
|
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold tracking-normal text-slate-950">{title}</h1>
|
|
{description && <p className="mt-1 max-w-3xl text-sm text-slate-600">{description}</p>}
|
|
</div>
|
|
{actions && <div className="flex flex-wrap gap-2">{actions}</div>}
|
|
</div>
|
|
);
|
|
}
|