Last active
September 9, 2017 23:08
-
-
Save KTruong008/d604a42ea3af99a09935894aeabcf1da 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'; | |
export const Text = props => { | |
return ( | |
<div className="mv4 w-100"> | |
<div className="b sans-serif pv2 w-100"> | |
{props.label} | |
</div> | |
<input | |
{...props.input} | |
placeholder={props.label} | |
type="text" | |
className="pa2 ba b--black-40 w-100" | |
/> | |
{props.meta && props.meta.error && props.meta.touched && ( | |
<div className="sans-serif red"> | |
{props.meta.error} | |
</div> | |
)} | |
</div> | |
); | |
} | |
export default Text; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment