storybook/docs/snippets/angular/button-story-with-args.ts.mdx
2021-05-17 22:31:53 +01:00

19 lines
357 B
Plaintext

```ts
//Button.stories.ts
import { Story } from '@storybook/angular/types-6-0';
//👇 We create a “template” of how args map to rendering
const Template: Story<Button> = (args) => ({
props: args,
});
//👇 Each story then reuses that template
export const Primary = Template.bind({});
Primary.args = {
primary: true,
label: 'Button',
};
```