mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-11-17 12:19:20 +00:00
[17/n][Storybook] Step (single) story
This commit is contained in:
parent
6fdbcf6f46
commit
16df36715a
51
packages/frontend/src/stories/Components/Step.stories.tsx
Normal file
51
packages/frontend/src/stories/Components/Step.stories.tsx
Normal file
@ -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<typeof Step> = {
|
||||
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<typeof Step>;
|
||||
|
||||
export const Default: Story = {};
|
||||
|
||||
export const Horizontal: Story = {
|
||||
args: {
|
||||
orientation: 'horizontal',
|
||||
},
|
||||
};
|
||||
|
||||
export const Past: Story = {
|
||||
args: {
|
||||
index: 1,
|
||||
currentIndex: 2,
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user