diff options
Diffstat (limited to 'components/PostList/PurePostList.stories.js')
-rw-r--r-- | components/PostList/PurePostList.stories.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/components/PostList/PurePostList.stories.js b/components/PostList/PurePostList.stories.js new file mode 100644 index 0000000..cf812f7 --- /dev/null +++ b/components/PostList/PurePostList.stories.js @@ -0,0 +1,31 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import { postLink } from '../PostLink.stories' + +import PurePostList from './PurePostList' + +export const posts = Array(5).fill(postLink) +console.log(posts) + +storiesOf('PurePostList', module) + .addDecorator(center) + .add('default', () => { + return { + components: { PurePostList }, + template: `<pure-post-list :posts="posts"/>`, + data: () => ({ posts }) + } + }) + .add('loading', () => { + return { + components: { PurePostList }, + template: `<pure-post-list :posts="posts" loading/>` + } + }) + .add('no posts', () => { + return { + components: { PurePostList }, + template: `<pure-post-list :posts="posts"/>` + } + }) |