-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0da0606
commit a39b8bf
Showing
7 changed files
with
68 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React, { Component } from 'react'; | ||
import { reduxForm, Field } from 'redux-form'; | ||
|
||
import { FormTitle } from '../formTitle'; | ||
import { FormInput } from '../formFields'; | ||
|
||
class SigninForm extends Component { | ||
render() { | ||
return ( | ||
<form className='sign-in-form'> | ||
<FormTitle className='sign-in-form__title' text='Login'/> | ||
<Field className='sign-in-form__email' component={FormInput} name='email' type='email'/> | ||
</form> | ||
) | ||
} | ||
} | ||
|
||
SigninForm = reduxForm({ | ||
form: 'signin' | ||
})(SigninForm); | ||
|
||
export default SigninForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React, { Component } from 'react'; | ||
|
||
|
||
export class FormInput extends Component { | ||
render() { | ||
const { className, title } = this.props; | ||
return ( | ||
<div className='form-input'> | ||
<label>{title}</label> | ||
<input className={`${className} form-input`}/> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { combineReducers } from 'redux'; | ||
|
||
import { reducer as form } from 'redux-form'; | ||
|
||
const rootReducer = combineReducers({ | ||
state: (state = {}) => state | ||
form | ||
|
||
}); | ||
|
||
export default rootReducer; |