* Extract reusable league wizard components; wire settings page (#103) 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> * Fix sports-season test: add participants to mock data findDraftableSportsSeasons now returns participantCount, which requires participants in the mock db response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix sports-season test: loosen makeMockDb type to Record<string, unknown>[] typeof mockSeasons became too strict after adding participants to the mock data, breaking inline arrays in other tests that don't include participants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
976 B
TypeScript
43 lines
976 B
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { WizardAuthForm } from "./WizardAuthForm";
|
|
|
|
const meta: Meta<typeof WizardAuthForm> = {
|
|
title: "League/WizardAuthForm",
|
|
component: WizardAuthForm,
|
|
parameters: { layout: "centered" },
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="w-[420px]">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
args: {
|
|
setAuthTab: () => {},
|
|
displayName: "",
|
|
setDisplayName: () => {},
|
|
authEmail: "",
|
|
setAuthEmail: () => {},
|
|
authPassword: "",
|
|
setAuthPassword: () => {},
|
|
userTimezone: "America/New_York",
|
|
setUserTimezone: () => {},
|
|
onSocialLogin: () => {},
|
|
submitting: false,
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof WizardAuthForm>;
|
|
|
|
export const CreateTab: Story = {
|
|
args: { authTab: "create" },
|
|
};
|
|
|
|
export const LoginTab: Story = {
|
|
args: { authTab: "login" },
|
|
};
|
|
|
|
export const Submitting: Story = {
|
|
args: { authTab: "create", submitting: true },
|
|
};
|