dstpabuaran.com/resources/js/components/layout/page-header.tsx

22 lines
652 B
TypeScript

import type { ReactNode } from 'react';
type PageHeaderProps = {
title: string;
description?: ReactNode;
actions?: ReactNode;
};
export function PageHeader({ title, description, actions }: PageHeaderProps) {
return (
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">
{title}
</h2>
{description}
</div>
{actions && <div className="flex flex-wrap items-center gap-2">{actions}</div>}
</div>
);
}