Extracts 9 domain components from new.tsx and $leagueId.settings.tsx into app/components/league/ (each with a Storybook story), consolidates wizard form-building into wizard-state.ts, and updates the settings page to use the shared components instead of hand-rolled duplicates. new.tsx shrinks from ~2000 → ~1280 lines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
973 B
TypeScript
36 lines
973 B
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { DraftSpeedPicker } from "./DraftSpeedPicker";
|
|
|
|
const meta: Meta<typeof DraftSpeedPicker> = {
|
|
title: "League/DraftSpeedPicker",
|
|
component: DraftSpeedPicker,
|
|
parameters: { layout: "padded" },
|
|
args: { onChange: () => {} },
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof DraftSpeedPicker>;
|
|
|
|
export const StandardPreset: Story = {
|
|
args: { timerMode: "standard", value: "90" },
|
|
};
|
|
|
|
export const StandardCustom: Story = {
|
|
args: { timerMode: "standard", value: "300" },
|
|
};
|
|
|
|
export const ChessClockStandard: Story = {
|
|
args: { timerMode: "chess_clock", value: "standard" },
|
|
};
|
|
|
|
export const ChessClockSlow: Story = {
|
|
args: { timerMode: "chess_clock", value: "slow" },
|
|
};
|
|
|
|
export const ChessClockCustom: Story = {
|
|
args: { timerMode: "chess_clock", value: "custom:7200:900" },
|
|
};
|
|
|
|
export const Disabled: Story = {
|
|
args: { timerMode: "chess_clock", value: "standard", disabled: true },
|
|
};
|