-
-
Save alcidesqueiroz/42b5b5b480e6b7803f9eefd5fe03deb3 to your computer and use it in GitHub Desktop.
It's 2018: you shouldn't be writing vanilla CSS - Example 17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import styled from 'styled-components'; | |
const Title = styled.h1` | |
color: white; | |
font-size: 2rem; | |
`; | |
const Content = styled.div` | |
background: blue; | |
padding: 2rem; | |
`; | |
class Example extends Component { | |
render() { | |
return ( | |
<Content> | |
<Title>Hi everyone!</Title> | |
</Content> | |
); | |
} | |
} | |
export default Example; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment