Skip to content

Instantly share code, notes, and snippets.

@neoighodaro
Created December 5, 2017 10:34
Show Gist options
  • Save neoighodaro/b96373738ff96de714be3e8fefbdbd57 to your computer and use it in GitHub Desktop.
Save neoighodaro/b96373738ff96de714be3e8fefbdbd57 to your computer and use it in GitHub Desktop.
const TodoComponent = {
width: "300px",
margin: "30px auto",
backgroundColor: "#44014C",
minHeight: "200px",
boxSizing: "border-box"
}
const Header = {
padding: "10px 20px",
textAlign: "center",
color: "white",
fontSize: "22px"
}
const ErrorMessage = {
color: "white",
fontSize: "13px"
}
class ToDoApp extends React.Component {
// ...
render() {
return (
<div style={TodoComponent}>
<h2 style={Header}>ToDo</h2>
<div>
<Input onChange={this.handleChange} />
<p style = {ErrorMessage}>{this.state.error}</p>
<ToDoList value={this.state.display} />
</div>
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment