TicketSidebarContent.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import type { ObjectLike } from '#shared/types/utils.ts'
  4. import CommonActionMenu from '#desktop/components/CommonActionMenu/CommonActionMenu.vue'
  5. import type { MenuItem } from '#desktop/components/CommonPopoverMenu/types.ts'
  6. interface Props {
  7. title: string
  8. icon: string
  9. entity?: ObjectLike
  10. actions?: MenuItem[]
  11. }
  12. defineProps<Props>()
  13. </script>
  14. <template>
  15. <div class="flex w-full gap-2 p-3">
  16. <CommonLabel
  17. tag="h2"
  18. class="min-h-7 grow gap-1.5"
  19. size="large"
  20. :prefix-icon="icon"
  21. icon-color="text-stone-200 dark:text-neutral-500"
  22. >
  23. {{ $t(title) }}
  24. </CommonLabel>
  25. <CommonActionMenu
  26. v-if="actions"
  27. class="text-gray-100 dark:text-neutral-400"
  28. no-single-action-mode
  29. placement="arrowEnd"
  30. :entity="entity"
  31. :actions="actions"
  32. />
  33. </div>
  34. <div class="flex h-full flex-col gap-3 overflow-y-auto p-3">
  35. <slot />
  36. </div>
  37. </template>