initializeFieldEditor.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FieldEditorClass, FieldEditorProps } from './types.ts'
  3. // Provide your own map with the following keys, the values given here are just examples.
  4. let editorClasses: FieldEditorClass = {
  5. actionBar: {
  6. buttonContainer: '',
  7. tableMenuContainer: '',
  8. leftGradient: {
  9. left: '',
  10. before: {
  11. background: {
  12. light: '',
  13. dark: '',
  14. },
  15. },
  16. },
  17. rightGradient: {
  18. before: {
  19. background: {
  20. light: '',
  21. dark: '',
  22. },
  23. },
  24. },
  25. shadowGradient: {
  26. before: {
  27. top: '',
  28. height: '',
  29. },
  30. },
  31. button: {
  32. base: '',
  33. active: '',
  34. },
  35. },
  36. input: {
  37. container: '',
  38. },
  39. }
  40. export const initializeFieldEditorClasses = (classes: FieldEditorClass) => {
  41. editorClasses = classes
  42. }
  43. export const getFieldEditorClasses = () => editorClasses
  44. let editorProps: FieldEditorProps = {
  45. actionBar: {
  46. button: {
  47. icon: {
  48. size: 'small',
  49. },
  50. },
  51. },
  52. }
  53. export const initializeFieldEditorProps = (props: FieldEditorProps) => {
  54. editorProps = props
  55. }
  56. export const getFieldEditorProps = () => editorProps