storybook/docs/snippets/angular/button-group-story.ts.mdx
2021-03-09 15:26:53 +00:00

39 lines
822 B
Plaintext

```ts
// ButtonGroup.stories.ts
import { Story, Meta } from '@storybook/angular/types-6-0';
import { moduleMetadata } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import ButtonGroup from './ButtonGroup.component';
import Button from './button.component';
//👇 Imports the Button stories
import * as ButtonStories from './Button.stories';
export default {
title: 'ButtonGroup',
component: ButtonGroup,
decorators: [
moduleMetadata({
declarations: [Button],
imports: [CommonModule],
}),
],
} as Meta;
const Template: Story<ButtonGroup> = (args) => ({
props: args,
});
export const Pair = Template.bind({});
Pair.args = {
buttons: [
{ ...ButtonStories.Primary.args },
{ ...ButtonStories.Secondary.args },
],
orientation: 'horizontal',
};
```