Skip to content

Commit

Permalink
feat(progress-indicator): add storybook controls (#12473)
Browse files Browse the repository at this point in the history
* feat(progress-indicator): add storybook controls

* Update packages/react/src/components/ProgressIndicator/ProgressIndicator.stories.js

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 10, 2022
1 parent c608c18 commit 1f0ce2d
Showing 1 changed file with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,64 @@ export const Interactive = () => (
);

export const Skeleton = () => <ProgressIndicatorSkeleton />;

export const Playground = (args) => (
<ProgressIndicator {...args}>
<ProgressStep
complete
label="First step"
description="Step 1: Getting started with Carbon Design System"
secondaryLabel="Optional label"
/>
<ProgressStep
current
label="Second step with tooltip"
description="Step 2: Getting started with Carbon Design System"
/>
<ProgressStep
label="Third step with tooltip"
description="Step 3: Getting started with Carbon Design System"
/>
<ProgressStep
label="Fourth step"
description="Step 4: Getting started with Carbon Design System"
invalid
secondaryLabel="Example invalid step"
/>
<ProgressStep
label="Fifth step"
description="Step 5: Getting started with Carbon Design System"
disabled
/>
</ProgressIndicator>
);

Playground.argTypes = {
children: {
table: {
disable: true,
},
},
className: {
table: {
disable: true,
},
},
onChange: {
table: {
disable: true,
},
},
currentIndex: {
control: { type: 'number' },
defaultValue: 0,
},
spaceEqually: {
control: { type: 'boolean' },
defaultValue: false,
},
vertical: {
control: { type: 'boolean' },
defaultValue: false,
},
};

0 comments on commit 1f0ce2d

Please sign in to comment.