53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import React, { ReactNode } from 'react';
|
|
import { Heading } from '@/ui/Heading';
|
|
import { Text } from '@/ui/Text';
|
|
import { Container } from '@/ui/Container';
|
|
import { Group } from '@/ui/Group';
|
|
|
|
import { VerticalBar } from '@/ui/VerticalBar';
|
|
|
|
interface PageHeaderProps {
|
|
title: string;
|
|
subtitle?: string;
|
|
action?: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* Generic PageHeader component following the Teams page style.
|
|
* Used to maintain visual consistency across main directory pages.
|
|
*/
|
|
export function PageHeader({ title, subtitle, action }: PageHeaderProps) {
|
|
return (
|
|
<Container
|
|
size="full"
|
|
padding="none"
|
|
py={12}
|
|
>
|
|
<Group
|
|
justify="between"
|
|
align="end"
|
|
wrap
|
|
gap={6}
|
|
>
|
|
<Group direction="col" gap={2}>
|
|
<Group align="center" gap={3}>
|
|
<VerticalBar height="2rem" />
|
|
<Heading level={1} weight="bold" uppercase>{title}</Heading>
|
|
</Group>
|
|
{subtitle && (
|
|
<Text variant="low" size="lg" uppercase weight="bold" letterSpacing="widest">
|
|
{subtitle}
|
|
</Text>
|
|
)}
|
|
</Group>
|
|
|
|
{action && (
|
|
<Group align="center">
|
|
{action}
|
|
</Group>
|
|
)}
|
|
</Group>
|
|
</Container>
|
|
);
|
|
}
|