Anchor.vue 818 B

1234567891011121314151617181920212223
  1. <template>
  2. <NuxtLink :href="href" class="group text-inherit no-underline flex items-center hover:text-inherit">
  3. <div v-if="inView">
  4. <div class="mt-1 hidden opacity-0 transition group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
  5. <div class="group/anchor block h-5 w-5 -ml-7 rounded-lg ring-1 ring-inset transition bg-zinc-800 ring-zinc-700 hover:bg-zinc-700 hover:ring-zinc-600">
  6. <IconsAnchor class="h-5 w-5 transition stroke-zinc-400 group-hover/anchor:stroke-white" />
  7. </div>
  8. </div>
  9. </div>
  10. <slot/>
  11. </NuxtLink>
  12. </template>
  13. <script setup>
  14. const props = defineProps({
  15. href: {
  16. default: ''
  17. },
  18. inView: {
  19. default: false
  20. }
  21. });
  22. </script>