/*
Copyright (C) 2025 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
import React from 'react';
/**
* 企业中心统一卡片容器(方案 A+ 底盘层)。
* 实底表面 + 小圆角 + 1px 细边框 + 极轻海拔,靠边框分层,不用毛玻璃;
* 消除「裸表格」「Semi Card」「卡片表格」并存的不一致。
*
* @param {React.ReactNode} [title] 可选卡片标题(提供时渲染统一头部)
* @param {React.ReactNode} [subtitle] 标题下方副说明
* @param {React.ComponentType} [icon] 标题左侧 lucide 图标
* @param {React.ReactNode} [actions] 头部右侧操作区
* @param {string} [className] 追加类名
* @param {string} [padding] 内容内边距类,默认 'p-4';表格场景可传 'p-0' / 'p-2'
* @param {string} [bodyClassName] 内容容器追加类名
*/
const OrgPanel = ({
children,
title,
subtitle,
icon: Icon,
actions,
className = '',
padding = 'p-4',
bodyClassName = '',
}) => {
const hasHeader = title || actions;
return (
{hasHeader && (
{Icon && (
)}
{title && (
{title}
)}
{subtitle && (
{subtitle}
)}
{actions && (
{actions}
)}
)}
{children}
);
};
export default OrgPanel;