67 lines
1.2 KiB
TypeScript
67 lines
1.2 KiB
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { RankingsRow } from "./RankingsRow";
|
|
|
|
const meta: Meta<typeof RankingsRow> = {
|
|
title: "Scoring/RankingsRow",
|
|
component: RankingsRow,
|
|
parameters: {
|
|
layout: "padded",
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof RankingsRow>;
|
|
|
|
const baseArgs = {
|
|
teamId: "team-1",
|
|
teamName: "Thunder Hawks",
|
|
participantName: "LeBron James",
|
|
ownerName: "Chris M." as string | null,
|
|
isOwned: false,
|
|
rowClass: "flex items-center justify-between p-3 rounded-lg bg-card border border-border",
|
|
};
|
|
|
|
export const WithRankAndPoints: Story = {
|
|
args: {
|
|
...baseArgs,
|
|
rankLabel: 1,
|
|
points: 100,
|
|
showPoints: true,
|
|
},
|
|
};
|
|
|
|
export const WithRankOnly: Story = {
|
|
args: {
|
|
...baseArgs,
|
|
rankLabel: 3,
|
|
showPoints: false,
|
|
},
|
|
};
|
|
|
|
export const OwnedByUser: Story = {
|
|
args: {
|
|
...baseArgs,
|
|
participantName: "Jayson Tatum",
|
|
isOwned: true,
|
|
rankLabel: 2,
|
|
points: 70,
|
|
showPoints: true,
|
|
},
|
|
};
|
|
|
|
export const WithOwnerName: Story = {
|
|
args: {
|
|
...baseArgs,
|
|
ownerName: "Sarah J.",
|
|
rankLabel: 4,
|
|
points: 40,
|
|
showPoints: true,
|
|
},
|
|
};
|
|
|
|
export const WithoutRankOrPoints: Story = {
|
|
args: {
|
|
...baseArgs,
|
|
showPoints: false,
|
|
},
|
|
};
|