Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14532 from lordVelisch/feature/add_angular_snippe…
…t_args docs: add angular code snippet for using args
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
```ts | ||
// Page.stories.ts | ||
|
||
import { Meta, Story } from '@storybook/angular/types-6-0'; | ||
import Page from './page.component'; | ||
|
||
export default { | ||
component: Page, | ||
title: 'Page', | ||
} as Meta; | ||
|
||
const Template: Story<Page> = (args) => ({ | ||
props: args, | ||
template: ` | ||
<storybook-page> | ||
<ng-container footer>${args.footer}</ng-container> | ||
</storybook-page>`, | ||
}); | ||
|
||
export const CustomFooter = Template.bind({}); | ||
CustomFooter.args = { | ||
footer: 'Built with Storybook', | ||
}; | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters