Skip to content

Instantly share code, notes, and snippets.

@suzdalnitski
Created September 4, 2018 01:49
Show Gist options
  • Save suzdalnitski/c4e6f762c4e737f67621923d7a6ddd34 to your computer and use it in GitHub Desktop.
Save suzdalnitski/c4e6f762c4e737f67621923d7a6ddd34 to your computer and use it in GitHub Desktop.
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