Guest User

Untitled

a guest
Jun 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. /* src/components/Loader.js */
  2.  
  3.  
  4. /* line 1 - 39 */
  5.  
  6. import React from 'react';
  7. import styled, { keyframes } from 'styled-components';
  8.  
  9. import { getColor } from '../utils/theme'
  10.  
  11. const Loader = ({ className }) => (<div className={className}><Loading/></div>)
  12.  
  13. const loading = keyframes`
  14. 0% {
  15. transform: rotate(0);
  16. } 100% {
  17. transform: rotate(360deg);
  18. }
  19. `;
  20.  
  21. const Loading = styled.div`
  22. color: transparent;
  23. min-height: 2rem;
  24. pointer-events: none;
  25. position: relative;
  26.  
  27. &::after {
  28. content: "";
  29. animation: ${loading} .5s infinite linear;
  30. border: .1rem solid ${getColor('primary')};
  31. border-radius: 50%;
  32. border-right-color: transparent;
  33. border-top-color: transparent;
  34. display: block;
  35. z-index: 1;
  36. left: 50%;
  37. position: absolute;
  38. top: 50%;
  39. height: 1.6rem;
  40. width: 1.6rem
  41. margin-left: -.8rem;
  42. margin-top: -.8rem;
  43. }
  44. `;
  45.  
  46. .
  47. .
  48. .
Add Comment
Please, Sign In to add comment