storybook/docs/snippets/angular/my-component-story-basic-and-props.ts.mdx

27 lines
556 B
Plaintext

```ts
// MyComponent.stories.ts
import type { Meta, StoryFn } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Path/To/MyComponent',
component: MyComponent,
} as Meta;
export const Default: StoryFn = () => ({
props: {},
});
export const WithProp: StoryFn = () => ({
props: {
prop: 'value',
},
});
```