CommonHelpText.vue 619 B

12345678910111213141516171819202122232425
  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. interface Props {
  5. helpText?: string | string[]
  6. }
  7. defineProps<Props>()
  8. </script>
  9. <template>
  10. <div class="ltr:text-left rtl:text-right">
  11. <template v-if="Array.isArray(helpText)">
  12. <CommonLabel
  13. v-for="(text, index) in helpText"
  14. :key="`${text}-${index}`"
  15. tag="p"
  16. >{{ text }}</CommonLabel
  17. >
  18. </template>
  19. <CommonLabel v-else tag="p">{{ helpText }}</CommonLabel>
  20. </div>
  21. </template>