Skip to content

Commit

Permalink
test: ProgressBar 컴포넌트 스토리북 제작 #58
Browse files Browse the repository at this point in the history
  • Loading branch information
seoye0ng committed Jan 9, 2024
1 parent fd94389 commit 58eaf0d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/components/shared/progress-bar/ProgressBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import type { Meta, StoryObj } from '@storybook/react';

import ProgressBar from './ProgressBar';

const meta: Meta = {
title: 'Shared/ProgressBar',
component: ProgressBar,
tags: ['autodocs'],
argTypes: {
progressCount: {
type: 'number',
min: 1,
max: 5,
step: 1,
},
currentProgress: {
control: {
type: 'range',
min: 1,
max: 5,
step: 1, // 조절 간격
},
},
},
}satisfies Meta<typeof ProgressBar>;

export default meta;
type Story = StoryObj<typeof meta>;

export const CarDetailInput: Story = {
args: {
progressCount: 5,
currentProgress: 3,
},
};

export const CarWashDetailInput: Story = {
args: {
progressCount: 3,
currentProgress: 1,
},
};

0 comments on commit 58eaf0d

Please sign in to comment.