<script setup>
defineProps({
  href: String,
  type: {
    default: "button",
  },
});
</script>
<template>
  <div
    class="block hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white cursor-pointer"
  >
    <a :href="href" v-if="href" class="w-full text-start block px-4 py-2">
      <slot />
    </a>
    <button v-else class="w-full text-start block px-4 py-2" :type="type">
      <slot />
    </button>
  </div>
</template>
