From 51657bea447bbca461fc076b36392ce36db81cef Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Sat, 8 Jun 2024 06:39:58 +0100 Subject: [PATCH] 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 --- packages/web_ui/src/components/PageHeader.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/web_ui/src/components/PageHeader.tsx b/packages/web_ui/src/components/PageHeader.tsx index 97377ea9..4c78bf31 100644 --- a/packages/web_ui/src/components/PageHeader.tsx +++ b/packages/web_ui/src/components/PageHeader.tsx @@ -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
-

{props.title}

+ +

{props.title}

+ {props.subTitle && {props.subTitle}} +
{props.extra &&
{props.extra}
}
; }