- Two-column layout (My Leagues 2/3, Upcoming Events 1/3) with mobile stack - LeagueRow: square avatar, gradient draft highlight, rank/points display, progress bar - MyLeaguesCard, CreateLeagueCard with shared SectionCardHeader - UpcomingEventsCard: vertical timeline with grouped multi-league events - Shared gradient system: BracktGradients SVG defs, GradientIcon wrapper, brand.ts constants - Button default variant updated to green→cyan gradient - Navbar: plain nav links with gradient hover, support/admin icon buttons - Accessibility fixes: semantic h2 headings, aria-label on LeagueAvatar and nav elements - Storybook stories for all new components Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
960 B
TypeScript
28 lines
960 B
TypeScript
import type { ComponentType, ReactNode } from "react";
|
|
import type { LucideProps } from "lucide-react";
|
|
import { CardHeader } from "~/components/ui/card";
|
|
import { GradientIcon } from "~/components/ui/GradientIcon";
|
|
|
|
interface SectionCardHeaderProps {
|
|
icon: ComponentType<LucideProps>;
|
|
title: string;
|
|
right?: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* Consistent header for top-level section cards (My Leagues, Create a League, etc.).
|
|
* Renders a gradient icon + xl bold title, with an optional right-side slot.
|
|
*/
|
|
export function SectionCardHeader({ icon, title, right }: SectionCardHeaderProps) {
|
|
return (
|
|
<CardHeader className="pb-2">
|
|
<div className="flex items-center justify-between">
|
|
<div className="flex items-center gap-2">
|
|
<GradientIcon icon={icon} className="h-5 w-5 shrink-0" />
|
|
<h2 className="text-xl font-bold leading-none tracking-tight">{title}</h2>
|
|
</div>
|
|
{right}
|
|
</div>
|
|
</CardHeader>
|
|
);
|
|
}
|