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 (
|
2024-03-22 16:45:21 +00:00
|
|
|
<div className="flex h-24 items-center">
|
|
|
|
<div className="flex-1 text-2xl">
|
2024-02-28 14:28:12 +00:00
|
|
|
{props.title}
|
|
|
|
{props.desc && (
|
|
|
|
<Tooltip title={props.desc}>
|
2024-03-22 16:45:21 +00:00
|
|
|
<QuestionCircleOutlined className="ml-2 cursor-help text-sm" />
|
2024-02-28 14:28:12 +00:00
|
|
|
</Tooltip>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
|
2023-09-20 16:19:37 +00:00
|
|
|
{props.action}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
PageHeader.displayName = 'PageHeader';
|