import React from 'react'; import { cn } from '@/lib/utils'; /** * 控制台页面容器组件 * 提供统一的页面布局基础 */ interface ConsolePageProps { /** 页面标题 */ title?: string; /** 标题右侧的操作区 */ titleAction?: React.ReactNode; /** 页面内容 */ children: React.ReactNode; /** 额外的 className */ className?: string; /** 内容区的 className */ contentClassName?: string; } /** * 控制台页面容器 * 提供统一的页面布局和间距 */ export function ConsolePage({ title, titleAction, children, className, contentClassName, }: ConsolePageProps) { return (
{/* 页面标题行 */} {(title || titleAction) && (
{title && (

{title}

)} {titleAction && (
{titleAction}
)}
)} {/* 页面内容 */}
{children}
); }