mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
35 lines
815 B
TypeScript
35 lines
815 B
TypeScript
import { ReactNode } from 'react';
|
|
import { Heading, Icon, Row, Text } from '@umami/react-zen';
|
|
|
|
export function PageHeader({
|
|
title,
|
|
description,
|
|
icon,
|
|
showBorder = true,
|
|
children,
|
|
}: {
|
|
title: string;
|
|
description?: string;
|
|
icon?: ReactNode;
|
|
showBorder?: boolean;
|
|
allowEdit?: boolean;
|
|
className?: string;
|
|
children?: ReactNode;
|
|
}) {
|
|
return (
|
|
<Row
|
|
justifyContent="space-between"
|
|
alignItems="center"
|
|
paddingY="6"
|
|
border={showBorder ? 'bottom' : undefined}
|
|
width="100%"
|
|
>
|
|
<Row alignItems="center" gap="3">
|
|
{icon && <Icon>{icon}</Icon>}
|
|
{title && <Heading size="4">{title}</Heading>}
|
|
{description && <Text color="muted">{description}</Text>}
|
|
</Row>
|
|
<Row justifyContent="flex-end">{children}</Row>
|
|
</Row>
|
|
);
|
|
}
|