22 lines
540 B
TypeScript
22 lines
540 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">
|
|
<div>
|
|
<h1 className="text-3xl font-bold tracking-tight">{title}</h1>
|
|
{description && (
|
|
<p className="text-muted-foreground text-balance">{description}</p>
|
|
)}
|
|
</div>
|
|
{action && <div>{action}</div>}
|
|
</div>
|
|
)
|
|
}
|