link.ts 646 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import { createSection } from '@formkit/inputs'
  3. import { markRaw } from 'vue'
  4. import FormFieldLink from '@shared/components/Form/FormFieldLink.vue'
  5. import type { FormKitSchemaNode } from '@formkit/core'
  6. export const link = createSection(
  7. 'link',
  8. () =>
  9. ({
  10. $el: 'div',
  11. if: '$link',
  12. attrs: {
  13. class: 'formkit-link flex items-center py-2',
  14. },
  15. children: [
  16. {
  17. $cmp: markRaw(FormFieldLink),
  18. props: {
  19. link: '$link',
  20. },
  21. },
  22. ],
  23. } as unknown as FormKitSchemaNode),
  24. )