Skip to content

Instantly share code, notes, and snippets.

@alcidesqueiroz
Created September 22, 2018 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alcidesqueiroz/42b5b5b480e6b7803f9eefd5fe03deb3 to your computer and use it in GitHub Desktop.
Save alcidesqueiroz/42b5b5b480e6b7803f9eefd5fe03deb3 to your computer and use it in GitHub Desktop.
It's 2018: you shouldn't be writing vanilla CSS - Example 17
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