forked from rajun/ar-test
feat: add page header
This commit is contained in:
parent
aaebb28a23
commit
dcdbfcd086
20
app/components/ui/page-header.tsx
Normal file
20
app/components/ui/page-header.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user