first commit
This commit is contained in:
31
src/components/primitives/PageHeader.tsx
Normal file
31
src/components/primitives/PageHeader.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
'use client';
|
||||
|
||||
import {VStack, HStack} from '@astryxdesign/core/Layout';
|
||||
import {Heading, Text} from '@astryxdesign/core/Text';
|
||||
|
||||
/**
|
||||
* Every workspace page opens the same way: title, one line of orientation,
|
||||
* and page-level actions on the trailing edge. Centralising it is what keeps
|
||||
* five modules from drifting into five different header treatments.
|
||||
*/
|
||||
export function PageHeader({
|
||||
title,
|
||||
description,
|
||||
actions,
|
||||
}: {
|
||||
title: string;
|
||||
description?: string;
|
||||
actions?: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<HStack hAlign="between" vAlign="start" gap={4}>
|
||||
<VStack gap={1}>
|
||||
<Heading level={1}>{title}</Heading>
|
||||
{description ? (
|
||||
<Text color="secondary">{description}</Text>
|
||||
) : null}
|
||||
</VStack>
|
||||
{actions ? <HStack gap={2}>{actions}</HStack> : null}
|
||||
</HStack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user