Created
May 17, 2018 09:23
-
-
Save Swiip/18a2b219def761533a82218dbbc0b676 to your computer and use it in GitHub Desktop.
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, { keyframes } from "styled-components"; | |
const spin = keyframes` | |
0 { transform: rotate(0deg) translateZ(0); } | |
100% { transform: rotate(-360deg) translateZ(0); } | |
`; | |
const BB8 = styled.div` | |
&:before { | |
animation: ${({ turn }) => | |
turn ? `${spin} 0.8s infinite linear` : "none"}; | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment