Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import styled from 'styled-components';
const TagComponent = styled.div`
background-color: #44014C;
width: 300px;
min-height: 200px;
margin: 30px auto;
box-sizing: border-box;
`;
const Header = styled.h2`
padding: 10px 20px;
text-align: center;
color: white;
fontSize: 22px
`;
const ErrorMessage = styled.p`
color: white;
font-size: 13px;
`;
class ToDoApp extends React.Component {
// ...
render() {
return (
<TagComponent>
<Header>ToDo</Header>
<div>
<Input onChange={this.handleChange} />
<ErrorMessage>{this.state.error}</ErrorMessage>
<ToDoList value={this.state.display} />
</div>
</TagComponent>
)
}
}
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.