24 lines
588 B
TypeScript
24 lines
588 B
TypeScript
import type { ReactNode } from "react";
|
|
|
|
export function PageHeader({
|
|
title,
|
|
description,
|
|
actions,
|
|
}: {
|
|
title: string;
|
|
description?: string;
|
|
actions?: ReactNode;
|
|
}) {
|
|
return (
|
|
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold tracking-tight">{title}</h1>
|
|
{description && (
|
|
<p className="mt-1 text-sm text-muted-foreground">{description}</p>
|
|
)}
|
|
</div>
|
|
{actions && <div className="flex items-center gap-2">{actions}</div>}
|
|
</div>
|
|
);
|
|
}
|