68 lines
2.1 KiB
React
68 lines
2.1 KiB
React
/*
|
|
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 <https://www.gnu.org/licenses/>.
|
|
|
|
For commercial licensing, please contact support@quantumnous.com
|
|
*/
|
|
import React from 'react';
|
|
|
|
/**
|
|
* 企业工作台横幅,背景与轮廓来自原型 .ew-hero。
|
|
*
|
|
* @param {React.ReactNode} eyebrow 顶部小字(如时段问候/版块名)
|
|
* @param {React.ReactNode} title 大标题
|
|
* @param {React.ReactNode} [subtitle] 副文案
|
|
* @param {React.ReactNode} [actions] 右侧操作区
|
|
* @param {React.ReactNode} [children] 底部扩展槽(如 KPI 行)
|
|
* @param {string} [className]
|
|
*/
|
|
const OrgHero = ({
|
|
eyebrow,
|
|
title,
|
|
subtitle,
|
|
actions,
|
|
children,
|
|
className = '',
|
|
}) => (
|
|
<div className={`org-workbench-hero ${className}`}>
|
|
<div className='org-workbench-hero-art' aria-hidden='true'>
|
|
<i />
|
|
<i />
|
|
<i />
|
|
</div>
|
|
<div className='org-workbench-hero-content'>
|
|
<div className='org-workbench-hero-heading'>
|
|
<div className='min-w-0'>
|
|
{eyebrow && (
|
|
<div className='org-workbench-hero-greeting'>{eyebrow}</div>
|
|
)}
|
|
<h1>{title}</h1>
|
|
{subtitle && (
|
|
<p className='org-workbench-hero-subtitle'>{subtitle}</p>
|
|
)}
|
|
</div>
|
|
{actions && (
|
|
<div className='org-hero-actions flex items-center gap-2 flex-wrap justify-end'>
|
|
{actions}
|
|
</div>
|
|
)}
|
|
</div>
|
|
{children && <div className='mt-4'>{children}</div>}
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
export default OrgHero;
|