Files
leaudit-platform-frontend/app/components/rules/new/PageHeader.tsx
T
LiangShiyong 66d2f7cef4 1.添加移动端用户的检测工具类,移动端用户只能访问对话页面。
2.评查点列表添加文档属性类型字段。
3.优化dify的对话侧边栏的显示效果。
4.评查点规则添加使用文档属性类型的输入框。添加多实体开关的操作开关。
2025-12-30 18:35:48 +08:00

44 lines
1.1 KiB
TypeScript

import { Button } from '~/components/ui/Button';
interface PageHeaderProps {
title: string;
onSave?: () => void;
onBack?: () => void;
showSaveButton?: boolean;
showBackButton?: boolean;
}
export function PageHeader({
title,
onSave,
onBack,
showSaveButton = true,
showBackButton = true
}: PageHeaderProps) {
return (
<div className="flex justify-between items-center pb-2 mb-4 border-b border-gray-200">
<h1 className="text-xl font-medium text-gray-800">{title}</h1>
<div className="flex items-center gap-2">
{showBackButton && (
<Button
type="default"
className=" focus:!ring-gray-300"
onClick={onBack}
icon="ri-arrow-left-line"
>
</Button>
)}
{showSaveButton && (
<button
type="button"
className="ant-btn ant-btn-primary"
onClick={onSave}
>
<i className="ri-save-line mr-1"></i>
</button>
)}
</div>
</div>
);
}