From 74e6cc31e83ad570a9f06765d288e9024736e73f Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Sat, 10 Apr 2021 21:35:13 -0500
Subject: Commit MVP

---
 src/components/List.vue | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 src/components/List.vue

(limited to 'src/components/List.vue')

diff --git a/src/components/List.vue b/src/components/List.vue
new file mode 100644
index 0000000..031f708
--- /dev/null
+++ b/src/components/List.vue
@@ -0,0 +1,41 @@
+<template>
+  <ul class="list">
+    <li
+      v-for="item in items"
+      :key="item.id"
+      @click="$emit('selectionChanged', item)"
+      class="list-item">
+      <slot :item="item">{{ item }}</slot>
+    </li>
+  </ul>
+</template>
+
+<script>
+export default {
+  name: 'List',
+  props: {
+    items: Array,
+  },
+  emits: {
+    selectionChanged: null,
+  },
+};
+</script>
+
+<style scoped>
+.list {
+  list-style-type: none;
+}
+
+.list-item {
+  border: 1px solid grey;
+  border-radius: 5px;
+  margin: 5px 0;
+  padding: 0.15em;
+  text-align: center;
+}
+
+.list-item:hover {
+  background-color: rgb(182, 182, 182);
+}
+</style>
-- 
cgit v1.2.3

