brackt/app/components/draft/TimeBankAdjustmentDialog.stories.tsx

95 lines
2 KiB
TypeScript

import type { Meta, StoryObj } from "@storybook/react-vite";
import { TimeBankAdjustmentDialog } from "./TimeBankAdjustmentDialog";
const meta: Meta<typeof TimeBankAdjustmentDialog> = {
title: "Draft/TimeBankAdjustmentDialog",
component: TimeBankAdjustmentDialog,
parameters: {
layout: "padded",
},
};
export default meta;
type Story = StoryObj<typeof TimeBankAdjustmentDialog>;
export const AddTime: Story = {
args: {
open: true,
onOpenChange: () => {},
teamName: "Thunder Hawks",
amount: "30",
onAmountChange: () => {},
unit: "seconds",
onUnitChange: () => {},
direction: "add",
onDirectionChange: () => {},
isAdjusting: false,
onConfirm: () => {},
},
};
export const RemoveTime: Story = {
args: {
open: true,
onOpenChange: () => {},
teamName: "Shadow Hawks",
amount: "2",
onAmountChange: () => {},
unit: "minutes",
onUnitChange: () => {},
direction: "remove",
onDirectionChange: () => {},
isAdjusting: false,
onConfirm: () => {},
},
};
export const Adjusting: Story = {
name: "Adjusting...",
args: {
open: true,
onOpenChange: () => {},
teamName: "Iron Eagles",
amount: "1",
onAmountChange: () => {},
unit: "hours",
onUnitChange: () => {},
direction: "add",
onDirectionChange: () => {},
isAdjusting: true,
onConfirm: () => {},
},
};
export const NoTeamName: Story = {
name: "No Team Name",
args: {
open: true,
onOpenChange: () => {},
teamName: undefined,
amount: "15",
onAmountChange: () => {},
unit: "seconds",
onUnitChange: () => {},
direction: "add",
onDirectionChange: () => {},
isAdjusting: false,
onConfirm: () => {},
},
};
export const Closed: Story = {
args: {
open: false,
onOpenChange: () => {},
teamName: undefined,
amount: "",
onAmountChange: () => {},
unit: "seconds",
onUnitChange: () => {},
direction: "add",
onDirectionChange: () => {},
isAdjusting: false,
onConfirm: () => {},
},
};