storybook/docs/snippets/vue/button-group-story.ts-3.ts.mdx
2022-11-17 16:33:22 +01:00

37 lines
884 B
Plaintext

```ts
// ButtonGroup.stories.ts
import ButtonGroup from './ButtonGroup.vue';
import type { Meta, StoryObj } from '@storybook/vue3';
//👇 Imports the Button stories
import * as ButtonStories from './Button.stories';
const meta: Meta<typeof ButtonGroup> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/vue/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'ButtonGroup',
component: ButtonGroup,
};
export default meta;
type Story = StoryObj<typeof ButtonGroup>;
export const Pair: Story = {
render: (args) => ({
components: { ButtonGroup },
setup() {
return { args };
},
template: '<ButtonGroup v-bind="args" />',
}),
args: {
buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }],
orientation: 'horizontal',
},
};
```