mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 06:51:19 +08:00
30 lines
642 B
Plaintext
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',
|
|
},
|
|
};
|
|
```
|