storybook/docs/snippets/angular/page-story.ts.mdx

39 lines
866 B
Plaintext

```ts
// Page.stories.ts
import { Meta, moduleMetadata, StoryFn } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import { Button } from './button.component';
import { Header } from './header.component';
import { Page } from './page.component';
//👇 Imports all Header stories
import * as HeaderStories from './Header.stories';
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: 'Page',
component: Page,
decorators: [
moduleMetadata({
declarations: [Button, Header],
imports: [CommonModule],
}),
],
} as Meta;
const Template: StoryFn = (args) => ({
props: args,
});
export const LoggedIn = {
args: {
...HeaderStories.LoggedIn.args,
},
};
```