Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React from 'react';
import { TextField } from '@material-ui/core';
import { ErrorMessage } from 'formik';
export default (props) => {
return (
<div>
<TextField
id="input-with-icon-grid"
label={props.label}
name={props.field.name}
style={{ width: props.width, marginTop: props.marginTop }}
{...props.field}
/>
<ErrorMessage
name={props.field.name}
render={(msg) => <div className="text-danger">{msg}</div>}
/>
</div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.