Skip to content

Instantly share code, notes, and snippets.

@neoighodaro
Created December 5, 2017 10:51
Show Gist options
  • Save neoighodaro/ff3ee5f26fa6e9637e2f4c8762568131 to your computer and use it in GitHub Desktop.
Save neoighodaro/ff3ee5f26fa6e9637e2f4c8762568131 to your computer and use it in GitHub Desktop.
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