arrow.ts 720 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FormKitSchemaNode } from '@formkit/core'
  3. import { createSection } from '@formkit/inputs'
  4. import { useLocaleStore } from '@shared/stores/locale'
  5. export const arrow = createSection('arrow', () => {
  6. const locale = useLocaleStore()
  7. return {
  8. $el: 'div',
  9. attrs: {
  10. class: '$classes.arrow',
  11. },
  12. children: [
  13. {
  14. $cmp: 'CommonIcon',
  15. props: {
  16. size: 'base',
  17. class: 'shrink-0',
  18. name: `mobile-chevron-${
  19. locale.localeData?.dir === 'rtl' ? 'left' : 'right'
  20. }`,
  21. decorative: true,
  22. },
  23. },
  24. ],
  25. } as FormKitSchemaNode
  26. })