Created
April 26, 2019 14:32
-
-
Save anthonyatp/cbd17229c247eae86964b14ac33fc2fa 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
const SSkeletonPulse = styled.div` | |
display: inline-block; | |
height: 100%; | |
width: 100%; | |
background: ${props => | |
props.translucent | |
? css`linear-gradient(-90deg, #C1C1C1 0%, #F8F8F8 50%, #C1C1C1 100%)` | |
: css`linear-gradient(-90deg, #F0F0F0 0%, #F8F8F8 50%, #F0F0F0 100%)`}; | |
background-size: 400% 400%; | |
animation: pulse 1.2s ease-in-out infinite; | |
@keyframes pulse { | |
0% { | |
background-position: 0% 0%; | |
} | |
100% { | |
background-position: -135% 0%; | |
} | |
} | |
`; | |
export const SkeletonLine = () => ( | |
<SSkeletonLine translucent={translucent} /> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment