Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.