index.js 836 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import React from "react";
  2. import { reduxForm, Field } from "redux-form";
  3. import authValidate from "../../utils/validate";
  4. const Form = props => {
  5. const { handleSubmit } = props
  6. return (
  7. <div className="formdiv">
  8. <form className="form" onSubmit={handleSubmit}>
  9. <h1>Material Design Text Input With No Extra Markup</h1>
  10. <Field
  11. name="email"
  12. component="input"
  13. type="email"
  14. placeholder="example@email.com"
  15. className="input"
  16. />
  17. <Field
  18. name="password"
  19. component="input"
  20. type="password"
  21. placeholder ="password"
  22. className="input"
  23. />
  24. <button className="button">Submit</button>
  25. </form>
  26. </div>
  27. );
  28. }
  29. export default reduxForm({ form: "authForm", validate: authValidate })(Form);