25 lines
709 B
TypeScript
25 lines
709 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
export function PageTitle({
|
|
eyebrow,
|
|
title,
|
|
description,
|
|
actions
|
|
}: {
|
|
eyebrow: string;
|
|
title: string;
|
|
description?: string;
|
|
actions?: ReactNode;
|
|
}) {
|
|
return (
|
|
<div className="mb-6 flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between">
|
|
<div>
|
|
<p className="text-sm text-muted-foreground">{eyebrow}</p>
|
|
<h1 className="mt-1 text-2xl font-semibold tracking-tight md:text-3xl">{title}</h1>
|
|
{description ? <p className="mt-2 max-w-3xl text-sm leading-6 text-muted-foreground">{description}</p> : null}
|
|
</div>
|
|
{actions ? <div className="flex flex-wrap gap-2">{actions}</div> : null}
|
|
</div>
|
|
);
|
|
}
|