Skip to content

Instantly share code, notes, and snippets.

@fgnass
Last active April 20, 2017 07:07
Show Gist options
  • Save fgnass/2d444f07e9b9a5e7ad45a46917e40b05 to your computer and use it in GitHub Desktop.
Save fgnass/2d444f07e9b9a5e7ad45a46917e40b05 to your computer and use it in GitHub Desktop.
<πŸ’…> primary, secondary, :hover
import styled, { css } from 'styled-components';
const Button = styled.button`
font-size: 1em;
margin: 1em;
border: 2px solid palevioletred;
border-radius: 3px;
color: palevioletred;
${props => props.primary && css`
background: palevioletred;
color: white;
`}
${props => props.seconday && css`
background: rebeccapurple;
color: white;
`}
&:hover {
border-color: hotpink;
${props => props.primary && css`
background: hotpink;
`}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment