Initial import of weiyuan frontend
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
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';
|
||||
|
||||
/**
|
||||
* 企业中心统一页面标题区。
|
||||
* 所有企业页(/org/*)共用,保证标题字号、副标题、右侧操作区写法一致。
|
||||
*
|
||||
* @param {React.ComponentType} [icon] 可选的 lucide 图标组件(如 Wallet)
|
||||
* @param {React.ReactNode} title 主标题
|
||||
* @param {React.ReactNode} [subtitle] 副标题(一句话说明本页用途)
|
||||
* @param {React.ReactNode} [actions] 右侧操作区(刷新/新建等按钮)
|
||||
*/
|
||||
const OrgPageHeader = ({ icon: Icon, title, subtitle, actions }) => (
|
||||
<div className='mb-5 flex items-start justify-between gap-4 flex-wrap'>
|
||||
<div className='flex items-center gap-3 min-w-0'>
|
||||
{Icon && (
|
||||
<div className='flex-shrink-0 inline-flex h-9 w-9 items-center justify-center rounded-lg bg-brand/10 text-brand'>
|
||||
<Icon size={18} />
|
||||
</div>
|
||||
)}
|
||||
<div className='min-w-0'>
|
||||
<h1 className='text-lg sm:text-xl font-semibold tracking-tight text-[var(--text-primary)] truncate'>
|
||||
{title}
|
||||
</h1>
|
||||
{subtitle && (
|
||||
<p className='text-[13px] text-gray-500 dark:text-gray-400 mt-0.5 max-w-3xl'>
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{actions && (
|
||||
<div className='flex items-center gap-2 flex-wrap justify-end'>
|
||||
{actions}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
export default OrgPageHeader;
|
||||
Reference in New Issue
Block a user