| import React from 'react'; |
| import { cn } from '@/lib/utils'; |
|
|
| |
| |
| |
| |
|
|
| interface ConsolePageProps { |
| |
| title?: string; |
| |
| titleAction?: React.ReactNode; |
| |
| children: React.ReactNode; |
| |
| className?: string; |
| |
| contentClassName?: string; |
| } |
|
|
| |
| |
| |
| |
| export function ConsolePage({ |
| title, |
| titleAction, |
| children, |
| className, |
| contentClassName, |
| }: ConsolePageProps) { |
| return ( |
| <div className={cn('min-h-screen bg-console-surface-base', className)}> |
| <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6"> |
| {/* 页面标题行 */} |
| {(title || titleAction) && ( |
| <div className="flex items-center justify-between mb-6"> |
| {title && ( |
| <h1 className="text-lg font-semibold text-console-text-primary"> |
| {title} |
| </h1> |
| )} |
| {titleAction && ( |
| <div className="flex items-center gap-2"> |
| {titleAction} |
| </div> |
| )} |
| </div> |
| )} |
| |
| {/* 页面内容 */} |
| <div className={contentClassName}> |
| {children} |
| </div> |
| </div> |
| </div> |
| ); |
| } |
|
|