NavigationMenuList.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import CommonLabel from '#shared/components/CommonLabel/CommonLabel.vue'
  4. import type { NavigationMenuEntry } from '#desktop/components/NavigationMenu/types.ts'
  5. interface Props {
  6. items: NavigationMenuEntry[]
  7. }
  8. defineProps<Props>()
  9. </script>
  10. <template>
  11. <nav class="flex p-0">
  12. <ul class="m-0 flex basis-full flex-col gap-1 p-0">
  13. <li v-for="entry in items" :key="entry.label">
  14. <CommonLink
  15. class="flex gap-2 rounded-md px-2 py-3 text-sm text-gray-100 hover:bg-blue-600 hover:text-black hover:no-underline dark:text-neutral-400 dark:hover:bg-blue-900 dark:hover:text-white"
  16. exact-active-class="!bg-blue-800 w-full !text-white"
  17. internal
  18. :link="entry.route"
  19. >
  20. <slot v-bind="entry">
  21. <CommonLabel class="text-current">
  22. {{ $t(entry.label) }}
  23. </CommonLabel>
  24. </slot>
  25. </CommonLink>
  26. </li>
  27. </ul>
  28. </nav>
  29. </template>