import type { ReactNode } from 'react' import { SidebarTrigger } from '@mdxui/primitives/sidebar' import { Separator } from '@mdxui/primitives/separator' export interface PageHeaderProps { /** Breadcrumbs or other navigation */ breadcrumbs?: ReactNode /** Title for the page */ title?: string /** Description/subtitle for the page */ description?: string /** Actions to display on the right side */ actions?: ReactNode /** Whether to show the sidebar trigger */ showSidebarTrigger?: boolean /** Additional className */ className?: string } /** * PageHeader renders the header area for a page within the app shell. * Includes sidebar trigger, breadcrumbs, title, and actions. * * @example * ```tsx * } * title="Users" * description="Manage user accounts" * actions={ * * } * /> * ``` */ export function PageHeader({ breadcrumbs, title, description, actions, showSidebarTrigger = true, className, }: PageHeaderProps) { const hasTitleSection = title || description return (
{showSidebarTrigger && } {showSidebarTrigger && (breadcrumbs || hasTitleSection) && ( )} {breadcrumbs} {hasTitleSection && (
{title &&

{title}

} {description && (

{description}

)}
)}
{actions &&
{actions}
}
) }