Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import React, { Component } from 'react'
  2. import reduxForm from 'redux-form'
  3.  
  4. class Signin extends Component {
  5. handleFormSubmit({ email, password }) {
  6. console.log(email, password)
  7. }
  8.  
  9. render() {
  10. const { handleSumbit, fields: {email, password}} = this.props
  11.  
  12. return(
  13. <form onSubmit={handleSumbit(this.handleFormSubmit.bind(this))}>
  14. <fieldset className='form-group'>
  15. <label>Username:</label>
  16. <input {...username} className='form-control' />
  17. </fieldset>
  18. <fieldset className='form-group'>
  19. <label>Password:</label>
  20. <input {...password} className='form-control' />
  21. </fieldset>
  22. <button action='submit' className='btn btn-primary'>
  23. Sign in
  24. </button>
  25. </form>
  26. )
  27. }
  28. }
  29.  
  30. export default reduxForm({
  31. form: 'signin',
  32. fields: ['username', 'password']
  33. })(Signin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement