Skip to content

Instantly share code, notes, and snippets.

@viclotana
Created February 17, 2019 17:58
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 viclotana/e5cc34eafcefea80af9881ed8bfa4cad to your computer and use it in GitHub Desktop.
Save viclotana/e5cc34eafcefea80af9881ed8bfa4cad to your computer and use it in GitHub Desktop.
const Button = styled.a`
display: inline-block;
border-radius: 3px;
padding: 0.5rem 0;
margin: 0.5rem 1rem;
width: 11rem;
background: transparent;
color: white;
border: 2px solid white;
${props => props.primary && css`
background: white;
color: palevioletred;
`}
`
render(
<div>
<Button
href="https://github.com/styled-components/styled-components"
target="_blank"
rel="noopener"
primary>
GitHub
</Button>
<Button as={Link} href="/docs" prefetch>
Documentation
</Button>
</div>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment