Function
PageHeader
({
title,
description,
actions,
className,
children,
...props
}: Omit<React.ComponentProps<"div">, "title"> & {
title: React.ReactNode;
description?: React.ReactNode;
/** Optional trailing controls (buttons) aligned to the heading baseline. */
actions?: React.ReactNode;
})
Source from the content-addressed store, hash-verified
| 20 | } |
| 21 | |
| 22 | function PageHeader({ |
| 23 | title, |
| 24 | description, |
| 25 | actions, |
| 26 | className, |
| 27 | children, |
| 28 | ...props |
| 29 | }: Omit<React.ComponentProps<"div">, "title"> & { |
| 30 | title: React.ReactNode; |
| 31 | description?: React.ReactNode; |
| 32 | /** Optional trailing controls (buttons) aligned to the heading baseline. */ |
| 33 | actions?: React.ReactNode; |
| 34 | }) { |
| 35 | return ( |
| 36 | <div |
| 37 | data-slot="page-header" |
| 38 | className={cn("mb-10 flex items-start justify-between gap-4", className)} |
| 39 | {...props} |
| 40 | > |
| 41 | <div className="min-w-0"> |
| 42 | <h1 className="font-display text-[2rem] tracking-tight leading-none text-foreground"> |
| 43 | {title} |
| 44 | </h1> |
| 45 | {description && ( |
| 46 | <p className="mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground"> |
| 47 | {description} |
| 48 | </p> |
| 49 | )} |
| 50 | {children} |
| 51 | </div> |
| 52 | {actions && <div className="flex shrink-0 items-center gap-2">{actions}</div>} |
| 53 | </div> |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | export { PageContainer, PageHeader }; |
Callers
nothing calls this directly
Tested by
no test coverage detected