Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Last active November 9, 2022 17:40
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 BetterProgramming/0387c9462f349e639333d4d54ac8631d to your computer and use it in GitHub Desktop.
Save BetterProgramming/0387c9462f349e639333d4d54ac8631d to your computer and use it in GitHub Desktop.
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
// Create a Wrapper component that'll render a <section> tag with some styles
const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
// Use Title and Wrapper like any other React component – except they're styled!
render(
<Wrapper>
<Title>
Hello World!
</Title>
</Wrapper>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment