Skip to content

Instantly share code, notes, and snippets.

@angelorubin
Last active January 30, 2020 14:33
Show Gist options
  • Save angelorubin/a7393fc5511e0de326dff0fb6a17ab34 to your computer and use it in GitHub Desktop.
Save angelorubin/a7393fc5511e0de326dff0fb6a17ab34 to your computer and use it in GitHub Desktop.
Componente TextField Material UI
<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