From 16df36715ac033d98c1144e86ddbed3b533bba0d Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Tue, 14 May 2024 17:04:07 -0400 Subject: [PATCH] [17/n][Storybook] Step (single) story --- .../src/stories/Components/Step.stories.tsx | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 packages/frontend/src/stories/Components/Step.stories.tsx diff --git a/packages/frontend/src/stories/Components/Step.stories.tsx b/packages/frontend/src/stories/Components/Step.stories.tsx new file mode 100644 index 00000000..223e831e --- /dev/null +++ b/packages/frontend/src/stories/Components/Step.stories.tsx @@ -0,0 +1,51 @@ +import { StoryObj, Meta } from '@storybook/react'; + +import { Step, StepTheme } from 'components/shared/Steps'; + +const stepOrientations: StepTheme['orientation'][] = ['horizontal', 'vertical']; + +const meta: Meta = { + title: 'Components/Step', + component: Step, + tags: ['autodocs'], + argTypes: { + orientation: { + control: 'radio', + options: stepOrientations, + }, + currentIndex: { + control: 'number', + }, + label: { + control: 'text', + }, + index: { + control: 'number', + }, + }, + args: { + orientation: 'vertical', + label: 'Create repository', + index: 1, + currentIndex: 1, + }, +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = {}; + +export const Horizontal: Story = { + args: { + orientation: 'horizontal', + }, +}; + +export const Past: Story = { + args: { + index: 1, + currentIndex: 2, + }, +};