Toolbar.vue 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <script setup>
  2. const props = defineProps({
  3. selectedCount: Number
  4. })
  5. </script>
  6. <template>
  7. <div class="toolbar has-text-centered">
  8. <div class="columns">
  9. <div class="column has-nowrap px-0">
  10. <!-- selected label -->
  11. <span class="has-text-grey mr-1">{{ selectedCount }}&nbsp;{{ $t('commons.selected') }}</span>
  12. <!-- deselect all -->
  13. <button id="btnUnselectAll" @click="$emit('clear-selected')" class="clear-selection delete mr-4" :style="{visibility: selectedCount > 0 ? 'visible' : 'hidden'}" :title="$t('commons.clear_selection')"></button>
  14. <!-- select all button -->
  15. <button id="btnSelectAll" @click="$emit('select-all')" class="button mr-5 has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.select_all')">
  16. <span>{{ $t('commons.all') }}</span>
  17. <FontAwesomeIcon class="ml-1" :icon="['fas', 'check-square']" />
  18. </button>
  19. <!-- sort asc/desc buttons -->
  20. <button id="btnSortAscending" @click="$emit('sort-asc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_ascending')">
  21. <FontAwesomeIcon :icon="['fas', 'sort-alpha-down']" />
  22. </button>
  23. <button id="btnSortDescending" @click="$emit('sort-desc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_descending')">
  24. <FontAwesomeIcon :icon="['fas', 'sort-alpha-up']" />
  25. </button>
  26. </div>
  27. </div>
  28. </div>
  29. </template>