brackt/app/components/ui/SectionCardHeader.tsx
Chris Parsons e0cd829b9f Redesign home page with new layout and component system
- 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>
2026-04-15 19:50:39 -07:00

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