Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React from 'react'
import style from "./style";
const TextField = ({name, onChange, onBlur, error, label}) => (
<div style={style.inputGroup}>
<label>
{label}
<input
style={style.input}
type="text"
name={name}
onChange={onChange}
onBlur={onBlur}
/>
{error && <div style={style.error}>{error}</div>}
</label>
</div>
);
export default TextField;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment