diff options
Diffstat (limited to 'components/PurePostList.vue')
-rw-r--r-- | components/PurePostList.vue | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/components/PurePostList.vue b/components/PurePostList.vue new file mode 100644 index 0000000..a93360d --- /dev/null +++ b/components/PurePostList.vue @@ -0,0 +1,38 @@ +<template> + <div> + <div v-if="posts" class="post-list"> + <post-link + v-for="(post, index) in posts" + :key="index" + :route="post.route" + :title="post.title" + :description="post.description" + /> + </div> + <div v-else>Brak wpisów</div> + </div> +</template> + +<script> +import PostLink from './PostLink' + +export default { + name: 'PurePostList', + components: { PostLink }, + props: { + posts: { + type: Array, + required: true + } + } +} +</script> + +<style scoped> +.post-list { + display: flex; + flex-wrap: wrap; + justify-content: center; + max-width: 900px; +} +</style> \ No newline at end of file |