aboutsummaryrefslogtreecommitdiff
path: root/src/components/List.vue
blob: f1ef6904aa1f2fcb7af4e65ecc5fc66f30ac7d92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<template>
  <ul class="list">
    <li
      v-for="item in items"
      :key="item.id"
      @click="$emit('selectionChanged', 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;
  margin: 0;
  padding: 0;
}
</style>