import type { ComponentType, ReactNode } from "react" import { cn } from "@/shared/lib/utils" /** * 页面头部:统一的标题 + 描述 + 操作区域布局。 * * 覆盖以下重复模式: * - AdminDashboardView 内联头部 * - Profile 页面内联头部 * - SettingsView 内联头部 * - Security 页面内联头部(带图标) * * 结构:左侧标题 + 描述,右侧操作区域(响应式:移动端纵向,桌面端横向)。 */ interface PageHeaderProps { /** 页面标题 */ title: string /** 标题下方描述文本 */ description?: string /** 标题左侧图标组件(lucide-react 图标等) */ icon?: ComponentType<{ className?: string }> /** 右侧操作区域(按钮、徽章等) */ actions?: ReactNode /** 额外类名 */ className?: string } export function PageHeader({ title, description, icon: Icon, actions, className }: PageHeaderProps) { return (
{Icon ? : null}

{title}

{description ? (
{description}
) : null}
{actions ?
{actions}
: null}
) }