<template>
<div class="entries shadowbox">
  <span class="entry" v-for="entry in entries"
  @click="$emit('select', entry.value)"
  >{{entry.text}}</span>
</div>
</template>

<style scoped>
  .entries {
    display: flex;
    flex-flow: column;
    position: absolute;
    left: 0;
    background: #e7e9ed;
    width: 100%;
    margin-top: 5px;
    z-index: 3;
    border: 1px solid black;
    top: 100%;
  }
  
  .entry {
    border-bottom: 1px solid;
    padding: 5px;
    cursor: pointer;
  }
</style>

<script setup>
const props = defineProps(['entries'])
const emits = defineEmits(['select'])
</script>