mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:01:21 +08:00
25 lines
594 B
Plaintext
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',
|
|
};
|
|
``` |