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