feat: add PageHeader component and centralize page spacing
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:
2026-03-03 14:01:07 +01:00
parent 66ac190c15
commit 2e00522bfc
26 changed files with 97 additions and 84 deletions

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

View File

@@ -9,6 +9,7 @@ export { EditableMotivatorTitle } from './EditableMotivatorTitle';
export { EditableYearReviewTitle } from './EditableYearReviewTitle';
export { EditableWeeklyCheckInTitle } from './EditableWeeklyCheckInTitle';
export { EditableWeatherTitle } from './EditableWeatherTitle';
export { PageHeader } from './PageHeader';
export { Input } from './Input';
export { ParticipantInput } from './ParticipantInput';
export { Modal, ModalFooter } from './Modal';