21 lines
676 B
TypeScript
21 lines
676 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { Text } from '~/components/ui/text';
|
|
|
|
interface PageHeaderProps {
|
|
title: string;
|
|
description?: string;
|
|
actions?: ReactNode;
|
|
}
|
|
|
|
export function PageHeader({ title, description, actions }: PageHeaderProps) {
|
|
return (
|
|
<div className='flex flex-wrap items-end justify-between gap-4'>
|
|
<div className='flex flex-col gap-1.5'>
|
|
<Text as='h1' variant='display'>{title}</Text>
|
|
{description && <Text tone='subtle'>{description}</Text>}
|
|
</div>
|
|
{actions && <div className='flex flex-wrap items-center gap-3'>{actions}</div>}
|
|
</div>
|
|
);
|
|
}
|