/*
 * @Author: 赵伟
 * @Date: 2024-09-02 08:42:57
 * @Description: 自定义 Spin
 */

import { Spin, SpinProps } from 'antd';
import './index.less';

interface KFSpinProps extends SpinProps {
  /** 加载文本 */
  label?: string;
}

/** 自定义 Spin */
function KFSpin({ label = '加载中', ...rest }: KFSpinProps) {
  return (
    <div className={'kf-spin'}>
      <Spin {...rest} />
      <div className={'kf-spin__label'}>{label}</div>
    </div>
  );
}

export default KFSpin;
