import { Box, Typography, alpha, useTheme } from "@mui/material"; import { ReactNode } from "react"; // 自定义卡片组件接口 export interface EnhancedCardProps { title: ReactNode; icon: ReactNode; action?: ReactNode; children: ReactNode; iconColor?: | "primary" | "secondary" | "error" | "warning" | "info" | "success"; minHeight?: number | string; noContentPadding?: boolean; } // 自定义卡片组件 export const EnhancedCard = ({ title, icon, action, children, iconColor = "primary", minHeight, noContentPadding = false, }: EnhancedCardProps) => { const theme = useTheme(); const isDark = theme.palette.mode === "dark"; return ( {icon} {typeof title === "string" ? ( {title} ) : ( title )} {action} {children} ); };