CommonDivider.vue 846 B

123456789101112131415161718192021222324252627282930313233
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import type { DividerOrientation } from './types.ts'
  4. interface Props {
  5. orientation?: DividerOrientation
  6. padding?: boolean
  7. }
  8. const props = withDefaults(defineProps<Props>(), {
  9. orientation: 'horizontal',
  10. })
  11. </script>
  12. <template>
  13. <div
  14. :class="{
  15. 'w-full': props.orientation === 'horizontal',
  16. 'h-full': props.orientation === 'vertical',
  17. 'px-2.5': props.padding && props.orientation === 'horizontal',
  18. 'py-2.5': props.padding && props.orientation === 'vertical',
  19. }"
  20. >
  21. <hr
  22. class="border-0 bg-neutral-100 dark:bg-gray-900"
  23. :class="{
  24. 'h-px w-full': props.orientation === 'horizontal',
  25. 'h-full w-px': props.orientation === 'vertical',
  26. }"
  27. />
  28. </div>
  29. </template>