32 lines
694 B
TypeScript
32 lines
694 B
TypeScript
import { Space, Typography } from "antd";
|
|
import type { ReactNode } from "react";
|
|
|
|
export function AdminPageHeader({
|
|
title,
|
|
description,
|
|
extra,
|
|
}: {
|
|
title: string;
|
|
description?: string;
|
|
extra?: ReactNode;
|
|
}) {
|
|
return (
|
|
<Space
|
|
align="start"
|
|
style={{ width: "100%", justifyContent: "space-between", marginBottom: 24 }}
|
|
>
|
|
<div>
|
|
<Typography.Title level={2} style={{ margin: 0 }}>
|
|
{title}
|
|
</Typography.Title>
|
|
{description && (
|
|
<Typography.Paragraph type="secondary" style={{ margin: "8px 0 0" }}>
|
|
{description}
|
|
</Typography.Paragraph>
|
|
)}
|
|
</div>
|
|
{extra}
|
|
</Space>
|
|
);
|
|
}
|