2024-02-28 14:28:12 +00:00
|
|
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
|
|
import { Tooltip } from 'antd';
|
2023-09-20 16:19:37 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
export const PageHeader: React.FC<{
|
|
|
|
title: string;
|
2024-02-28 14:28:12 +00:00
|
|
|
desc?: React.ReactNode;
|
2023-09-20 16:19:37 +00:00
|
|
|
action?: React.ReactNode;
|
|
|
|
}> = React.memo((props) => {
|
|
|
|
return (
|
|
|
|
<div className="h-24 flex items-center">
|
2024-02-28 14:28:12 +00:00
|
|
|
<div className="text-2xl flex-1">
|
|
|
|
{props.title}
|
|
|
|
{props.desc && (
|
|
|
|
<Tooltip title={props.desc}>
|
|
|
|
<QuestionCircleOutlined className="text-sm ml-2 cursor-help" />
|
|
|
|
</Tooltip>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
|
2023-09-20 16:19:37 +00:00
|
|
|
{props.action}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
PageHeader.displayName = 'PageHeader';
|