Last active
April 17, 2017 15:16
-
-
Save lvarayut/1b28610fb58058cec692b864abd67216 to your computer and use it in GitHub Desktop.
Step-3 Style component
This file contains hidden or 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 mainColor = 'indianred' | |
const Title = styled.h1` | |
color: ${props => props.color || 'goldenrod'}; | |
font-size: 2.8em; | |
margin: 25px; | |
padding-bottom: 20px; | |
border-bottom: 1px solid ${mainColor}; | |
display: inline-block; | |
`; | |
class App extends Component { | |
render() { | |
return ( | |
<div className={this.props.className}> | |
<Title color={mainColor}>Mystagram</Title> | |
</div> | |
); | |
} | |
} | |
export default styled(App)` | |
width: 100vw; | |
height: 100vh; | |
text-align: center; | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment