This is just a technology testing project based on Create React App and TailwindCSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
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