Skip to content

Instantly share code, notes, and snippets.

@sAbakumoff
Created December 1, 2016 07:23
Show Gist options
  • Save sAbakumoff/5165c9615113cec14431563595a176c6 to your computer and use it in GitHub Desktop.
Save sAbakumoff/5165c9615113cec14431563595a176c6 to your computer and use it in GitHub Desktop.
export default class Login extends Component {
changeUsername (event) {
this.props.fieldChange('username', event.target.value);
}
changePassword (event) {
this.props.fieldChange('password', event.target.value);
}
render () {
return (
<form className={authStyles.form} onSubmit={this.props.onSubmit}>
<input type='text' name='username' placeholder='Username'value={this.props.username}
onChange={this.changeUsername}
/>
<input
type='password'
name='password'
placeholder='Password'
value={this.props.password}
onChange={this.changePassword}
/>
</form>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment