97 lines
2 KiB
TypeScript
97 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: [],
|
||
|
|
},
|
||
|
|
};
|