Extend PageHeader for plugins

My plugins used the antd pageheader more than base did. I did not notice that these features dissappeared when we migrated from antd to our own implementation - this brings them back
This commit is contained in:
Danielv123 authored and Daniel committed 2024-06-14 19:19:42 +02:00
1 parent 498638c0c9
commit 51657bea44
1 file changed
+8 -2
@@ -1,13 +1,19 @@
import React from "react";
import { Space, Typography } from "antd";
const { Text } = Typography;
type PageHeaderProps = {
title: string|React.ReactElement;
title: string | React.ReactElement;
subTitle?: string | React.ReactElement;
extra?: React.JSX.Element;
};
export default function PageHeader(props: PageHeaderProps): React.JSX.Element {
return <div className="page-header">
<h2 className="page-header-title">{props.title}</h2>
<Space>
<h2 className="page-header-title">{props.title}</h2>
{props.subTitle && <Text type="secondary">{props.subTitle}</Text>}
</Space>
{props.extra && <div className="page-header-extra">{props.extra}</div>}
</div>;
}