import React, { Component } from "react"; import styled from "styled-components"; import loading from "assets/loading.gif"; type PropsType = { offset?: string; width?: string; height?: string; }; type StateType = {}; export default class Loading extends Component { state = {}; render() { return ( ); } } const Spinner = styled.img` width: 20px; `; type StyleLoadingProps = PropsType; const StyledLoading = styled.div` width: ${(props: StyleLoadingProps) => props.width}; height: ${(props: StyleLoadingProps) => props.height}; display: flex; align-items: center; justify-content: center; margin-top: ${(props: StyleLoadingProps) => props.offset}; `;