Skip to content

Commit e75e941

Browse files
DRY story and make sure it uses all props setup in the original template
Co-authored-by: Lena Morita <[email protected]>
1 parent a8ad3e7 commit e75e941

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/components/src/progress-bar/stories/index.story.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ const withCustomWidthCustomCSS = `
5151
* }
5252
* ```
5353
*/
54-
export const WithCustomWidth: StoryFn< typeof ProgressBar > = () => {
55-
return (
54+
export const WithCustomWidth = Template.bind( {} );
55+
WithCustomWidth.args = {
56+
className: 'custom-progress-bar',
57+
};
58+
WithCustomWidth.decorators = [
59+
( Story ) => (
5660
<>
5761
<style>{ withCustomWidthCustomCSS }</style>
58-
<ProgressBar className="custom-progress-bar" />
62+
<Story />
5963
</>
60-
);
61-
};
64+
),
65+
];

0 commit comments

Comments
 (0)