Created
September 4, 2017 11:53
-
-
Save alexvcasillas/7f7a5ce482cb2412d389395cd50f8f0c to your computer and use it in GitHub Desktop.
styled-components-iterate
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
const Wrapper = styled.div` | |
display: inline-block; | |
animation-duration: ${({ duration }) => (duration ? `${duration}s` : '1s')}; | |
animation-name: ${({ animation }) => | |
animation ? animation : 'no-animation'}; | |
animation-fill-mode: forwards; | |
animation-iteration-count: ${({ iteration }) => | |
iteration ? iteration : '1'}; | |
&:hover { | |
${({ hoverTransitions }) => | |
hoverTransitions.forEach(transition => transition)}}; | |
} | |
&:focus { | |
} | |
&:active { | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment