mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
27 lines
559 B
Plaintext
27 lines
559 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) => ({
|
|
components: { ButtonGroup },
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: '<ButtonGroup v-bind="args" />',
|
|
});
|
|
|
|
export const Pair = Template.bind({});
|
|
Pair.args = {
|
|
buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }],
|
|
orientation: 'horizontal',
|
|
};
|
|
``` |