This is just a technology testing project based on Create React App and TailwindCSS
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

33 Zeilen
1.1KB

  1. import React from 'react'
  2. import FormikControlString from './FormikControlTypes/FormikControlString'
  3. import FormikControlPassword from './FormikControlTypes/FormikControlPassword'
  4. export function FormikControl(props) {
  5. const { control, ...rest } = props
  6. switch (control) {
  7. case 'string':
  8. return <FormikControlString {...rest} />
  9. case 'password':
  10. return <FormikControlPassword {...rest} />
  11. // case 'textarea':
  12. // return <FormikInputTextarea {...rest} />
  13. // case 'select':
  14. // return <FormikInputSelect {...rest} />
  15. // case 'radio':
  16. // return <FormikInputRadioGroup {...rest} />
  17. // case 'checkbox':
  18. // return <FormikInputCheckbox {...rest} />
  19. // case 'checkboxs':
  20. // return <FormikInputCheckboxGroup {...rest} />
  21. // case 'userconsent':
  22. // return <FormikInputUserConsent {...rest} />
  23. // case 'phone':
  24. // return <FormikInputPhone {...rest} />
  25. default:
  26. return null
  27. }
  28. }
  29. export default FormikControl