Skip to content

Instantly share code, notes, and snippets.

@anthonyatp
Created April 26, 2019 14:32
Show Gist options
  • Save anthonyatp/cbd17229c247eae86964b14ac33fc2fa to your computer and use it in GitHub Desktop.
Save anthonyatp/cbd17229c247eae86964b14ac33fc2fa to your computer and use it in GitHub Desktop.
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