index.tsx
/**
* @file Loading
*/
import React from 'react';
import {Spin} from 'antd';
import './index.less';
interface LoadingProps {
style?: React.CSSProperties;
className?: string;
}
const LoadingCom: React.FC<LoadingProps> = ({style, className}) => {
return (
<div className={'loading_box' + (className || '')} style={style}>
<Spin />
</div>
);
};
export default LoadingCom;
index.css
.loading_box {
margin-top: 200px;
padding: 30px 50px;
text-align: center;
}