import React from "react";
import "./css/Spin.css";
export default (props) => {
    const { spin, relative } = props;
    if (!spin) return ""
    return (
        <div className="ant-spin ant-spin-spinning ant-spin-show-text" style={{ position: relative ? "relative" : "" }}>
            <span className="ant-spin-dot ant-spin-dot-spin">
                <i className="ant-spin-dot-item"></i>
                <i className="ant-spin-dot-item"></i>
                <i className="ant-spin-dot-item"></i>
                <i className="ant-spin-dot-item"></i>
            </span>
            <div className="ant-spin-text">Loading...</div>
            <div className="ant-spin-background">

            </div>
        </div>
    )
}