feat: add PageHeader component and centralize page spacing
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m1s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m1s
- Create reusable PageHeader component (emoji + title + subtitle + actions) - Use PageHeader in sessions, teams, users, objectives pages - Centralize vertical padding in layout (py-6) and remove per-page py-* values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
src/components/ui/PageHeader.tsx
Normal file
24
src/components/ui/PageHeader.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
interface PageHeaderProps {
|
||||
emoji: string;
|
||||
title: string;
|
||||
subtitle?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function PageHeader({ emoji, title, subtitle, actions, className }: PageHeaderProps) {
|
||||
return (
|
||||
<div className={`mb-8 flex flex-col sm:flex-row sm:items-center justify-between gap-4 ${className ?? ''}`}>
|
||||
<div>
|
||||
<h1 className="flex items-center gap-3 text-3xl font-bold tracking-tight text-foreground">
|
||||
<span className="text-3xl leading-none">{emoji}</span>
|
||||
{title}
|
||||
</h1>
|
||||
{subtitle && <p className="mt-1.5 text-sm text-muted">{subtitle}</p>}
|
||||
</div>
|
||||
{actions && <div className="shrink-0">{actions}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user