- 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>
30 lines
843 B
TypeScript
30 lines
843 B
TypeScript
import type { ComponentType } from "react";
|
|
import type { LucideProps } from "lucide-react";
|
|
|
|
interface GradientIconProps extends Omit<LucideProps, "color"> {
|
|
icon: ComponentType<LucideProps>;
|
|
/** Defaults to the primary brand gradient (green → cyan). */
|
|
gradientId?: string;
|
|
}
|
|
|
|
/**
|
|
* Renders any Lucide icon with its stroke set to a named SVG gradient.
|
|
* Requires <BracktGradients /> to be mounted somewhere in the document.
|
|
*
|
|
* Usage:
|
|
* <GradientIcon icon={Shield} className="h-5 w-5" />
|
|
* <GradientIcon icon={Trophy} gradientId="brackt-primary-gradient" className="h-6 w-6" />
|
|
*/
|
|
export function GradientIcon({
|
|
icon: Icon,
|
|
gradientId = "brackt-primary-gradient",
|
|
style,
|
|
...props
|
|
}: GradientIconProps) {
|
|
return (
|
|
<Icon
|
|
{...props}
|
|
style={{ stroke: `url(#${gradientId})`, ...style }}
|
|
/>
|
|
);
|
|
}
|