| import React from 'react'; |
| import { cn } from '@/lib/utils'; |
|
|
| |
| |
| |
| |
|
|
| interface ConsoleHeaderProps { |
| |
| title: string; |
| |
| description?: string; |
| |
| actions?: React.ReactNode; |
| |
| className?: string; |
| } |
|
|
| |
| |
| |
| |
| export function ConsoleHeader({ |
| title, |
| description, |
| actions, |
| className, |
| }: ConsoleHeaderProps) { |
| return ( |
| <div className={cn('mb-6', className)}> |
| <div className="flex items-start justify-between gap-4"> |
| {/* 标题和描述 */} |
| <div className="min-w-0 flex-1"> |
| <h1 className="text-lg font-semibold text-console-text-primary"> |
| {title} |
| </h1> |
| {description && ( |
| <p className="mt-1 text-sm text-console-text-secondary"> |
| {description} |
| </p> |
| )} |
| </div> |
| |
| {/* 操作区 */} |
| {actions && ( |
| <div className="flex items-center gap-2 shrink-0"> |
| {actions} |
| </div> |
| )} |
| </div> |
| </div> |
| ); |
| } |
|
|