Skip to content

Instantly share code, notes, and snippets.

@lvarayut
Last active April 17, 2017 15:16
Show Gist options
  • Save lvarayut/1b28610fb58058cec692b864abd67216 to your computer and use it in GitHub Desktop.
Save lvarayut/1b28610fb58058cec692b864abd67216 to your computer and use it in GitHub Desktop.
Step-3 Style component
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