- 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>
96 lines
2 KiB
TypeScript
96 lines
2 KiB
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { MyLeaguesCard } from "./MyLeaguesCard";
|
|
|
|
const meta: Meta<typeof MyLeaguesCard> = {
|
|
title: "League/MyLeaguesCard",
|
|
component: MyLeaguesCard,
|
|
parameters: {
|
|
layout: "padded",
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof MyLeaguesCard>;
|
|
|
|
export const MixedStatuses: Story = {
|
|
args: {
|
|
leagues: [
|
|
{
|
|
leagueId: "league-abc-123",
|
|
leagueName: "Alpha Dynasty",
|
|
numSports: 2,
|
|
status: "active",
|
|
currentRank: 4,
|
|
previousRank: 6,
|
|
totalPoints: 1422.8,
|
|
},
|
|
{
|
|
leagueId: "league-hce-999",
|
|
leagueName: "Hardcourt Elites",
|
|
numSports: 1,
|
|
status: "draft",
|
|
seasonId: "season-xyz-456",
|
|
},
|
|
{
|
|
leagueId: "league-ssl-333",
|
|
leagueName: "Summer Smash",
|
|
numSports: 3,
|
|
status: "pre_draft",
|
|
},
|
|
{
|
|
leagueId: "league-wt-111",
|
|
leagueName: "2023 World Tour",
|
|
numSports: 2,
|
|
status: "completed",
|
|
currentRank: 2,
|
|
totalPoints: 3150.2,
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export const DraftingOnly: Story = {
|
|
args: {
|
|
leagues: [
|
|
{
|
|
leagueId: "league-abc-123",
|
|
leagueName: "World Aquatics Open",
|
|
numSports: 2,
|
|
status: "draft",
|
|
seasonId: "season-wao-789",
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export const ActiveOnly: Story = {
|
|
args: {
|
|
leagues: [
|
|
{
|
|
leagueId: "league-abc-123",
|
|
leagueName: "Alpha Dynasty",
|
|
numSports: 2,
|
|
status: "active",
|
|
currentRank: 4,
|
|
previousRank: 6,
|
|
totalPoints: 1422.8,
|
|
},
|
|
{
|
|
leagueId: "league-hce-999",
|
|
leagueName: "Hardcourt Elites",
|
|
numSports: 1,
|
|
status: "active",
|
|
currentRank: 12,
|
|
previousRank: 11,
|
|
totalPoints: 2810.0,
|
|
},
|
|
],
|
|
viewAllUrl: "/leagues",
|
|
},
|
|
};
|
|
|
|
export const Empty: Story = {
|
|
args: {
|
|
leagues: [],
|
|
},
|
|
};
|