mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
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:
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>;
|
||||
}
|
||||
Reference in new issue
Block a user