Skip to content

Instantly share code, notes, and snippets.

@Jimmydalecleveland
Created August 22, 2019 00:02
Show Gist options
  • Save Jimmydalecleveland/3fda816f156e48728d6fbd1a121bead4 to your computer and use it in GitHub Desktop.
Save Jimmydalecleveland/3fda816f156e48728d6fbd1a121bead4 to your computer and use it in GitHub Desktop.
An intro example of styled components from their docs
// Intro example from Styled Components docs
const Button = styled.button`
background: ${props => props.primary ? "palevioletred" : "white"};
color: ${props => props.primary ? "white" : "palevioletred"};
font-size: 1em;
margin: 1em;
padding: 0.25em 1em;
border: 2px solid palevioletred;
border-radius: 3px;
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment