CommonHelpText.vue 545 B

1234567891011121314151617181920212223
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. interface Props {
  4. helpText?: string | string[]
  5. }
  6. defineProps<Props>()
  7. </script>
  8. <template>
  9. <div class="ltr:text-left rtl:text-right">
  10. <template v-if="Array.isArray(helpText)">
  11. <CommonLabel
  12. v-for="(text, index) in helpText"
  13. :key="`${text}-${index}`"
  14. tag="p"
  15. >{{ text }}</CommonLabel
  16. >
  17. </template>
  18. <CommonLabel v-else tag="p">{{ helpText }}</CommonLabel>
  19. </div>
  20. </template>