mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:11:07 +08:00
Merge pull request #12815 from aach/docs-vue-page-story
docs: add vue/page-story.js
This commit is contained in:
commit
ae37b85365
21
docs/snippets/vue/page-story.js.mdx
Normal file
21
docs/snippets/vue/page-story.js.mdx
Normal file
@ -0,0 +1,21 @@
|
||||
```js
|
||||
// Page.stories.js
|
||||
|
||||
import Page from './Page.vue';
|
||||
import * as HeaderStories from './Header.stories';
|
||||
|
||||
export default {
|
||||
title: 'Page',
|
||||
};
|
||||
|
||||
const Template = (args, { argTypes }) => ({
|
||||
components: { Page },
|
||||
props: Object.keys(argTypes),
|
||||
template: '<page v-bind="$props" />',
|
||||
});
|
||||
|
||||
export const LoggedIn = Template.bind({});
|
||||
LoggedIn.args = {
|
||||
...HeaderStories.LoggedIn.args,
|
||||
};
|
||||
```
|
@ -88,7 +88,8 @@ Args are useful when writing stories for composite components that are assembled
|
||||
paths={[
|
||||
'react/page-story.js.mdx',
|
||||
'react/page-story.ts.mdx',
|
||||
'angular/page-story.ts.mdx'
|
||||
'angular/page-story.ts.mdx',
|
||||
'vue/page-story.js.mdx'
|
||||
]}
|
||||
/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user