diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-21 19:53:02 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-21 19:53:02 +0200 |
commit | 17fc6a6b4507e5535d8b6989b66da5bac323e87b (patch) | |
tree | e2edf46d74a376d0359bcdeb5d19646afeb218e4 /components/PostList/PurePostList.stories.js | |
parent | 424eaa9e8098cef762b1a2a7565d37944bb25306 (diff) | |
download | puszcza-17fc6a6b4507e5535d8b6989b66da5bac323e87b.tar.gz puszcza-17fc6a6b4507e5535d8b6989b66da5bac323e87b.zip |
Add PostList
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"/>` + } + }) |