storybook/docs/snippets/angular/button-group-story.ts.mdx
2021-09-03 23:31:04 +01:00

30 lines
642 B
Plaintext

```ts
// ButtonGroup.stories.ts
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 {
component: ButtonGroup,
decorators: [
moduleMetadata({
declarations: [Button],
imports: [CommonModule],
}),
],
};
export const Pair = {
args: {
buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }],
orientation: 'horizontal',
},
};
```