Skip to content

Instantly share code, notes, and snippets.

@suzdalnitski
Last active September 3, 2018 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzdalnitski/c418452d99e2b5ae6a662e180bd5cb63 to your computer and use it in GitHub Desktop.
Save suzdalnitski/c418452d99e2b5ae6a662e180bd5cb63 to your computer and use it in GitHub Desktop.
render() {
const { firstNameError, firstName } = this.state;
return (
<div
style={{
margin: 50,
padding: 10,
width: 300,
border: "1px solid black",
backgroundColor: "black",
color: "white"
}}
>
<div style={{marginBottom: 10}}>
<label>
First name:
<input
style={{backgroundColor: '#EFEFFF', marginLeft: 10}}
type="text"
name="firstName"
onChange={this.onFirstNameChange}
onBlur={this.onFirstNameBlur}
/>
{firstNameError && <div style={{color: 'red', margin: 5}}>{firstNameError}</div>}
</label>
</div>
<Greetings
firstName={firstName}
/>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment