FormField.ts 424 B

12345678910111213141516171819202122
  1. import FieldRule from './FieldRule';
  2. export enum FormFieldType {
  3. Text = 'text',
  4. Password = 'password',
  5. Phone = 'phone',
  6. Number = 'number',
  7. TextArea = 'textarea',
  8. Checkbox = 'checkbox',
  9. StarRating = 'starRating',
  10. }
  11. type FormField = {
  12. field: string;
  13. placeholder?: string;
  14. label?: string | JSX.Element;
  15. rules?: FieldRule[];
  16. type: FormFieldType;
  17. defaultValue?: unknown;
  18. };
  19. export default FormField;