From 18b44a3aebc56d32060e1d879a8f096eafbf262f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 25 Jan 2020 18:54:05 +0100 Subject: Add image to PostLink --- components/Posts/PostLink.stories.js | 13 +++++++-- components/Posts/PostLink.vue | 34 +++++++++++++++++------ components/Posts/PostList/PurePostList.stories.js | 15 +++++++--- components/Posts/PostList/PurePostList.vue | 9 +++--- 4 files changed, 52 insertions(+), 19 deletions(-) (limited to 'components/Posts') diff --git a/components/Posts/PostLink.stories.js b/components/Posts/PostLink.stories.js index 9b12c29..5fdfb6f 100644 --- a/components/Posts/PostLink.stories.js +++ b/components/Posts/PostLink.stories.js @@ -7,7 +7,9 @@ export const postLink = { title: 'Test PostLink', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.', - route: '/kronika/2019/20/11/test' + route: '/kronika/2019/20/11/test', + image: + 'https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80', } storiesOf('Posts/PostLink', module) @@ -16,6 +18,13 @@ storiesOf('Posts/PostLink', module) return { components: { PostLink }, template: ``, - data: () => postLink + data: () => postLink, + } + }) + .add('with image', () => { + return { + components: { PostLink }, + template: ``, + data: () => postLink, } }) diff --git a/components/Posts/PostLink.vue b/components/Posts/PostLink.vue index 8d0a669..5f7d5bf 100644 --- a/components/Posts/PostLink.vue +++ b/components/Posts/PostLink.vue @@ -1,9 +1,12 @@