Created
November 23, 2019 12:29
-
-
Save asouza/0378fb445abcecca40538c3c285f0545 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<Form onSubmit={handleSubmit} subscription={{ submitting: true }} validate={validate}> | |
{({ handleSubmit2, submitting }) => ( | |
<form onSubmit={handleSubmit2} className={classes.form} noValidate> | |
<Field | |
autoComplete="email" | |
autoFocus | |
component={RFTextField} | |
disabled={submitting || sent} | |
fullWidth | |
label="Email" | |
margin="normal" | |
name="email" | |
required | |
size="large" | |
/> | |
<Field | |
fullWidth | |
size="large" | |
component={RFTextField} | |
disabled={submitting || sent} | |
required | |
name="password" | |
autoComplete="current-password" | |
label="Password" | |
type="password" | |
margin="normal" | |
/> | |
<FormSpy subscription={{ submitError: true }}> | |
{({ submitError }) => | |
submitError ? ( | |
<FormFeedback className={classes.feedback} error> | |
{submitError} | |
</FormFeedback> | |
) : null | |
} | |
</FormSpy> | |
<FormButton | |
className={classes.button} | |
disabled={submitting || sent} | |
size="large" | |
color="secondary" | |
fullWidth | |
> | |
{submitting || sent ? 'In progress…' : 'Sign In'} | |
</FormButton> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment