CommonShowMoreButton.vue 583 B

1234567891011121314151617181920212223242526
  1. <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. interface Props {
  4. entities: unknown[]
  5. totalCount: number
  6. disabled?: boolean
  7. }
  8. defineProps<Props>()
  9. </script>
  10. <template>
  11. <button
  12. v-if="entities.length < totalCount"
  13. class="flex min-h-[54px] items-center justify-center gap-2"
  14. :class="{
  15. 'cursor-default text-gray-100/50': disabled,
  16. 'text-blue': !disabled,
  17. }"
  18. type="button"
  19. :disabled="disabled"
  20. >
  21. {{ $t('Show %s more', totalCount - entities.length) }}
  22. </button>
  23. </template>