mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 05:31:05 +08:00
26 lines
540 B
Plaintext
26 lines
540 B
Plaintext
```js
|
|
//ButtonGroup.stories.js
|
|
|
|
import ButtonGroup from './ButtonGroup';
|
|
import * as ButtonStories from './MyButton.stories';
|
|
|
|
export default {
|
|
title: 'ButtonGroup',
|
|
component: ButtonGroup,
|
|
};
|
|
|
|
const Template = (args, { argTypes }) => ({
|
|
components: { ButtonGroup },
|
|
props: Object.keys(argTypes),
|
|
template: '<ButtonGroup v-bind="$props" />'
|
|
});
|
|
|
|
export const Pair = Template.bind({});
|
|
Pair.args = {
|
|
buttons: [
|
|
{ ...ButtonStories.Primary.args },
|
|
{ ...ButtonStories.Secondary.args }
|
|
],
|
|
orientation: "horizontal"
|
|
};
|
|
``` |