ExternalReferenceContent.vue 830 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. interface Props {
  4. label: string
  5. values?: string[]
  6. }
  7. defineProps<Props>()
  8. </script>
  9. <template>
  10. <div class="flex flex-col gap-0.5">
  11. <CommonLabel
  12. size="small"
  13. class="block text-stone-200 dark:text-neutral-500"
  14. >
  15. {{ label }}
  16. </CommonLabel>
  17. <slot>
  18. <template v-if="values">
  19. <div role="list" class="flex flex-wrap gap-0.5">
  20. <CommonLabel
  21. v-for="(value, index) in values"
  22. :key="value"
  23. role="listitem"
  24. class="text-gray-100 dark:text-neutral-400"
  25. >
  26. {{ `${value}${index < values.length - 1 ? ',' : ''}` }}
  27. </CommonLabel>
  28. </div>
  29. </template>
  30. </slot>
  31. </div>
  32. </template>