storybook/docs/snippets/angular/your-component.ts.mdx
2020-10-08 22:45:09 +02:00

30 lines
685 B
Plaintext

```ts
// YourComponent.stories.tsx
import { Meta, moduleMetadata, Story } from '@storybook/angular';
import { YourComponent } from './your.component';
// This default export determines where your story goes in the story list
export default {
title: 'YourComponent',
component: YourComponent,
decorators: [
moduleMetadata({
declarations: [
YourComponent,
],
}),
],
} as Meta;
const Template: Story<YourComponent> = (args) => ({
component: YourComponent,
props: args,
});
export const YourStory = Template.bind({});
YourStory.args = {
/* the args you need here will depend on your component */
};
```