mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
28 lines
737 B
TypeScript
28 lines
737 B
TypeScript
import { ReactNode } from 'react';
|
|
import { Heading, Icon, Row, Text, RowProps } from '@umami/react-zen';
|
|
|
|
export function SectionHeader({
|
|
title,
|
|
description,
|
|
icon,
|
|
children,
|
|
...props
|
|
}: {
|
|
title?: string;
|
|
description?: string;
|
|
icon?: ReactNode;
|
|
allowEdit?: boolean;
|
|
className?: string;
|
|
children?: ReactNode;
|
|
} & RowProps) {
|
|
return (
|
|
<Row {...props} justifyContent="space-between" alignItems="center" height="60px">
|
|
<Row gap="3" alignItems="center">
|
|
{icon && <Icon size="md">{icon}</Icon>}
|
|
{title && <Heading size="3">{title}</Heading>}
|
|
{description && <Text color="muted">{description}</Text>}
|
|
</Row>
|
|
<Row justifyContent="flex-end">{children}</Row>
|
|
</Row>
|
|
);
|
|
}
|