PageLoading.js 539 B

12345678910111213141516171819202122232425262728
  1. import React from 'react';
  2. import styled from 'styled-components';
  3. import { spin } from '../../helpers/animations';
  4. const Loading = styled.div`
  5. margin: 0 0 48px;
  6. flex: 1 1 auto;
  7. flex-basis: 250px;
  8. display: flex;
  9. align-self: center;
  10. align-items: center;
  11. justify-content: center;
  12. `;
  13. const Icon = styled.img`
  14. display: block;
  15. width: 28px;
  16. height: 28px;
  17. animation: ${spin} 1s linear infinite;
  18. `;
  19. const pageLoading = () => (
  20. <Loading>
  21. <Icon src="/images/loader.svg" />
  22. </Loading>
  23. );
  24. export default pageLoading;