about summary refs log tree commit diff
path: root/components/PurePostList.vue
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-21 18:25:12 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-21 18:25:12 +0200
commit424eaa9e8098cef762b1a2a7565d37944bb25306 (patch)
tree2ded69401a7c0acb33b648b464d37d3a5dcdb6a5 /components/PurePostList.vue
parentd1c6e2eaed90891fc8e187f147af224b352662c8 (diff)
downloadpuszcza-424eaa9e8098cef762b1a2a7565d37944bb25306.tar.gz
puszcza-424eaa9e8098cef762b1a2a7565d37944bb25306.zip
Add storybook
Diffstat (limited to 'components/PurePostList.vue')
-rw-r--r--components/PurePostList.vue38
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