mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:21:16 +08:00
25 lines
569 B
Plaintext
25 lines
569 B
Plaintext
```js
|
|
//ButtonGroup.stories.js
|
|
|
|
import ButtonGroup from './ButtonGroup.vue';
|
|
|
|
//👇 Imports the Button stories
|
|
import * as ButtonStories from './MyButton.stories';
|
|
|
|
export default {
|
|
component: ButtonGroup,
|
|
title: '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',
|
|
};
|
|
``` |