aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/SectionHeader.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/common/SectionHeader.tsx')
-rw-r--r--src/components/common/SectionHeader.tsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/common/SectionHeader.tsx b/src/components/common/SectionHeader.tsx
new file mode 100644
index 0000000..5b911ef
--- /dev/null
+++ b/src/components/common/SectionHeader.tsx
@@ -0,0 +1,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>
+ );
+}