CommonShowMoreButton.vue 507 B

1234567891011121314151617181920212223
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import CommonButton from '#desktop/components/CommonButton/CommonButton.vue'
  4. interface Props {
  5. entities: unknown[]
  6. totalCount: number
  7. disabled?: boolean
  8. }
  9. defineProps<Props>()
  10. </script>
  11. <template>
  12. <CommonButton
  13. v-if="entities.length < totalCount"
  14. type="button"
  15. :disabled="disabled"
  16. >
  17. {{ $t('Show %s more', totalCount - entities.length) }}
  18. </CommonButton>
  19. </template>