22 lines
565 B
TypeScript
22 lines
565 B
TypeScript
import * as React from 'react'
|
|
|
|
interface PageHeaderProps {
|
|
title: string
|
|
description?: string
|
|
action?: React.ReactNode
|
|
}
|
|
|
|
export function PageHeader({ title, description, action }: PageHeaderProps) {
|
|
return (
|
|
<div className="flex items-center justify-between mb-8">
|
|
<div>
|
|
<h1 className="font-display text-2xl font-medium tracking-tight">{title}</h1>
|
|
{description && (
|
|
<p className="text-muted-foreground mt-1 text-balance">{description}</p>
|
|
)}
|
|
</div>
|
|
{action && <div>{action}</div>}
|
|
</div>
|
|
)
|
|
}
|