Skip to content

Commit

Permalink
ButtonGroup: Fix story to show what the component does (#65336)
Browse files Browse the repository at this point in the history
Co-authored-by: mirka <[email protected]>
Co-authored-by: ciampo <[email protected]>
  • Loading branch information
3 people authored Sep 17, 2024
1 parent d32a5b6 commit 5b037d7
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions packages/components/src/button-group/stories/index.story.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import type { Meta, StoryFn } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

/**
* Internal dependencies
Expand All @@ -22,18 +22,13 @@ const meta: Meta< typeof ButtonGroup > = {
};
export default meta;

const Template: StoryFn< typeof ButtonGroup > = ( args ) => {
const style = { margin: '0 4px' };
return (
<ButtonGroup { ...args }>
<Button variant="primary" style={ style }>
Button 1
</Button>
<Button variant="primary" style={ style }>
Button 2
</Button>
</ButtonGroup>
);
export const Default: StoryObj< typeof ButtonGroup > = {
args: {
children: (
<>
<Button variant="primary">Button 1</Button>
<Button>Button 2</Button>
</>
),
},
};

export const Default: StoryFn< typeof ButtonGroup > = Template.bind( {} );

0 comments on commit 5b037d7

Please sign in to comment.