storybook/docs/snippets/react/button-group-story.ts.mdx
2020-08-14 21:46:15 +01:00

21 lines
560 B
Plaintext

```ts
// ButtonGroup.stories.tsx
import React from 'react';
import { Story, Meta } from '@storybook/react/types-6-0';
import { ButtonGroup,ButtonGroupProps } from '../ButtonGroup';
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',
};
```