Last active
April 20, 2017 07:07
-
-
Save fgnass/2d444f07e9b9a5e7ad45a46917e40b05 to your computer and use it in GitHub Desktop.
<π
> primary, secondary, :hover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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