Files
linker/src/app/(admin)/admin/_components/dashboard-title.tsx
2025-08-09 14:12:12 +02:00

17 lines
491 B
TypeScript

type DashBoardTitleProps = {
renderSubtitle: true
subtitle: string
} | {
renderSubtitle?: false
subtitle?: never
}
export default function DashBoardTitle({ title, subtitle, renderSubtitle }: DashBoardTitleProps & { title: string }) {
return (
<div className="pb-6">
<h1 className="mb-2 text-2xl font-bold text-foreground">{title}</h1>
{renderSubtitle && <p className="text-sm text-muted-foreground">{subtitle}</p>}
</div>
)
}