Skip to content

Commit

Permalink
DRY story and make sure it uses all props setup in the original template
Browse files Browse the repository at this point in the history
Co-authored-by: Lena Morita <lena@jaguchi.com>
  • Loading branch information
fullofcaffeine and mirka committed May 28, 2024
1 parent a8ad3e7 commit e75e941
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/components/src/progress-bar/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ const withCustomWidthCustomCSS = `
* }
* ```
*/
export const WithCustomWidth: StoryFn< typeof ProgressBar > = () => {
return (
export const WithCustomWidth = Template.bind( {} );
WithCustomWidth.args = {
className: 'custom-progress-bar',
};
WithCustomWidth.decorators = [
( Story ) => (
<>
<style>{ withCustomWidthCustomCSS }</style>
<ProgressBar className="custom-progress-bar" />
<Story />
</>
);
};
),
];

0 comments on commit e75e941

Please sign in to comment.