Files
workshop-manager/src/components/ui/PageHeader.tsx
Froidefond Julien 2e00522bfc
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m1s
feat: add PageHeader component and centralize page spacing
- 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>
2026-03-03 14:01:07 +01:00

25 lines
765 B
TypeScript

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>
);
}