Loading.tsx 562 B

12345678910111213141516171819202122232425262728293031323334
  1. import React, { Component } from 'react';
  2. import styled from 'styled-components';
  3. import loading from '../assets/loading.gif';
  4. type PropsType = {
  5. };
  6. type StateType = {
  7. };
  8. export default class Loading extends Component<PropsType, StateType> {
  9. state = {
  10. }
  11. render() {
  12. return (
  13. <StyledLoading>
  14. <Spinner src={loading} />
  15. </StyledLoading>
  16. );
  17. }
  18. }
  19. const Spinner = styled.img`
  20. width: 25px;
  21. `;
  22. const StyledLoading = styled.div`
  23. width: 100%;
  24. height: 100%;
  25. display: flex;
  26. align-items: center;
  27. justify-content: center;
  28. `;