storybook/docs/snippets/react/button-group-story.ts.mdx
2021-02-23 00:26:03 +00:00

25 lines
594 B
Plaintext

```ts
// ButtonGroup.stories.tsx
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { ButtonGroup, ButtonGroupProps } from '../ButtonGroup';
//👇 Imports the Button stories
import * as ButtonStories from './Button.stories';
export default {
title: 'ButtonGroup',
component: ButtonGroup,
} as Meta;
const Template: Story<ButtonGroupProps> = (args) => <ButtonGroup {...args} />;
export const Pair = Template.bind({});
Pair.args = {
buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }],
orientation: 'horizontal',
};
```