Skip to content

Commit

Permalink
Add Progress to storybook;
Browse files Browse the repository at this point in the history
  • Loading branch information
lialila committed Feb 28, 2024
1 parent 4d30cec commit 91cf74e
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/stories/components/Progress.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';
import { Meta, StoryFn } from '@storybook/react';

import { Progress } from '../..';
import { COLOR_SCHEMES } from '../../constants/colorSchemes';

export default {
title: 'Components/Progress',
component: Progress,
argTypes: {
borderRadius: { control: { type: 'number' } },
width: { control: { type: 'number' } },
size: { options: ['xs', 'sm', 'md', 'lg'], control: { type: 'radio' } },
colorScheme: {
options: COLOR_SCHEMES,
control: { type: 'radio' },
},
hasStripe: { control: { type: 'boolean' } },
args: {
children: 'Progress',
},
},
} as Meta<typeof Progress>;

const Template: StoryFn<typeof Progress> = (args) => <Progress {...args} />;

export const Primary = Template.bind({});
Primary.args = {
value: '50',
colorScheme: 'primary',
width: 500,
borderRadius: 'full',
size: 'md',
};

export const ColorScheme = Template.bind({});
ColorScheme.args = {
value: '50',
colorScheme: 'red',
width: 500,
borderRadius: 'full',
size: 'md',
};

export const WithStripe = Template.bind({});
WithStripe.args = {
value: '50',
colorScheme: 'blue',
width: 500,
borderRadius: 'full',
size: 'md',
hasStripe: true,
};

0 comments on commit 91cf74e

Please sign in to comment.