ArticleBubbleHeader.vue 839 B

12345678910111213141516171819202122232425262728293031
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { computed } from 'vue'
  4. import type { TicketArticle } from '#shared/entities/ticket/types.ts'
  5. import ArticleBubbleMetaFields from '#desktop/pages/ticket/components/TicketDetailView/ArticleBubble/ArticleBubbleMetaFields.vue'
  6. interface Props {
  7. article: TicketArticle
  8. position: 'left' | 'right'
  9. }
  10. const props = defineProps<Props>()
  11. const metaFieldContainerClasses = computed(() =>
  12. props.position === 'right'
  13. ? ['dark:bg-stone-700', 'bg-blue-300']
  14. : ['dark:bg-gray-500', 'bg-neutral-50'],
  15. )
  16. </script>
  17. <template>
  18. <header
  19. :class="metaFieldContainerClasses"
  20. :aria-label="$t('Article meta information')"
  21. >
  22. <ArticleBubbleMetaFields :article="article" class="px-6 py-3" />
  23. </header>
  24. </template>