Update stories to match new component organization
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
import Progress from "../../app/components/progress/Progress";
|
||||
|
||||
export default {
|
||||
title: "Components/Progress",
|
||||
component: Progress,
|
||||
parameters: {
|
||||
layout: "centered",
|
||||
docs: {
|
||||
description: {
|
||||
component:
|
||||
"Progress bar component for showing completion percentage. Displays a 3-segment progress bar with support for partial fills.",
|
||||
},
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
progress: {
|
||||
control: { type: "select" },
|
||||
options: [
|
||||
"1-0",
|
||||
"1-1",
|
||||
"1-2",
|
||||
"1-3",
|
||||
"1-4",
|
||||
"1-5",
|
||||
"2-0",
|
||||
"2-1",
|
||||
"2-2",
|
||||
"3-0",
|
||||
"3-1",
|
||||
"3-2",
|
||||
],
|
||||
description: "Progress state (format: segments-partial)",
|
||||
},
|
||||
},
|
||||
tags: ["autodocs"],
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
progress: "3-2",
|
||||
},
|
||||
render: (args) => (
|
||||
<div className="w-full max-w-[600px]">
|
||||
<Progress {...args} />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
||||
export const AllStates = {
|
||||
args: {},
|
||||
render: (_args) => (
|
||||
<div className="space-y-4 w-full max-w-[600px]">
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-0</p>
|
||||
<Progress {..._args} progress="1-0" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-1</p>
|
||||
<Progress {..._args} progress="1-1" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-2</p>
|
||||
<Progress {..._args} progress="1-2" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-3</p>
|
||||
<Progress {..._args} progress="1-3" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-4</p>
|
||||
<Progress {..._args} progress="1-4" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">1-5</p>
|
||||
<Progress {..._args} progress="1-5" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">2-0</p>
|
||||
<Progress {..._args} progress="2-0" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">2-1</p>
|
||||
<Progress {..._args} progress="2-1" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">2-2</p>
|
||||
<Progress {..._args} progress="2-2" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">3-0</p>
|
||||
<Progress {..._args} progress="3-0" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">3-1</p>
|
||||
<Progress {..._args} progress="3-1" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<p className="text-white mb-2">3-2</p>
|
||||
<Progress {..._args} progress="3-2" />
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
story: "Different progress states of the progress bar component.",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,97 @@
|
||||
import Stepper from "../../app/components/progress/Stepper";
|
||||
|
||||
export default {
|
||||
title: "Components/Progress/Stepper",
|
||||
component: Stepper,
|
||||
parameters: {
|
||||
layout: "centered",
|
||||
docs: {
|
||||
description: {
|
||||
component:
|
||||
"Stepper component for showing progress through multi-step processes. Displays a series of steps with active steps highlighted.",
|
||||
},
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
active: {
|
||||
control: { type: "number", min: 1, max: 5 },
|
||||
description: "The active step number",
|
||||
},
|
||||
totalSteps: {
|
||||
control: { type: "number", min: 1, max: 10 },
|
||||
description: "Total number of steps",
|
||||
},
|
||||
},
|
||||
tags: ["autodocs"],
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
active: 1,
|
||||
totalSteps: 5,
|
||||
},
|
||||
};
|
||||
|
||||
export const AllStates = {
|
||||
args: {
|
||||
totalSteps: 5,
|
||||
},
|
||||
render: (_args) => (
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<p className="text-white mb-2">Step 1 of 5</p>
|
||||
<Stepper {..._args} active={1} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">Step 2 of 5</p>
|
||||
<Stepper {..._args} active={2} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">Step 3 of 5</p>
|
||||
<Stepper {..._args} active={3} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">Step 4 of 5</p>
|
||||
<Stepper {..._args} active={4} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">Step 5 of 5</p>
|
||||
<Stepper {..._args} active={5} />
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
story: "Different active states of the stepper component.",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const DifferentStepCounts = {
|
||||
args: {},
|
||||
render: () => (
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<p className="text-white mb-2">3 Steps - Step 2</p>
|
||||
<Stepper active={2} totalSteps={3} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">5 Steps - Step 3</p>
|
||||
<Stepper active={3} totalSteps={5} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-white mb-2">7 Steps - Step 4</p>
|
||||
<Stepper active={4} totalSteps={7} />
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
story: "Stepper with different total step counts.",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user