blob: 5b911efb4a07eb99315d8dea6b0d31d28f69dd25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { Heading, Icon, Row, type RowProps, Text } from '@umami/react-zen';
import type { ReactNode } from 'react';
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>
);
}
|