Last active
January 30, 2020 14:33
-
-
Save angelorubin/a7393fc5511e0de326dff0fb6a17ab34 to your computer and use it in GitHub Desktop.
Componente TextField Material UI
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
<TextField | |
onChange={handleChange} | |
value={values.url} | |
fullWidth | |
name="url" | |
error={!isValid} | |
placeholder=" Shorten a link here..." | |
variant="outlined" | |
size="small" | |
inputProps={{ | |
"data-testid": "url-input", | |
style: { | |
backgroundColor: "white", | |
fontWeight: "bold" | |
} | |
}} | |
/> | |
{errors.url && ( | |
<FormHelperText | |
data-testid="url-error-message" | |
className={classes.helperTextUrl} | |
> | |
{errors.url && touched.url && `${errors.url}`} | |
</FormHelperText> | |
)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment