import LoadingOutlined from '@ant-design/icons/LoadingOutlined'; import CSSMotion from 'rc-motion'; import React from 'react'; export interface LoadingIconProps { prefixCls: string; existIcon: boolean; loading?: boolean | object; } const getCollapsedWidth = (): React.CSSProperties => ({ width: 0, opacity: 0, transform: 'scale(0)', }); const getRealWidth = (node: HTMLElement): React.CSSProperties => ({ width: node.scrollWidth, opacity: 1, transform: 'scale(1)', }); const LoadingIcon: React.FC = ({ prefixCls, loading, existIcon }) => { const visible = !!loading; if (existIcon) { return ( ); } return ( {({ className, style }: { className?: string; style?: React.CSSProperties }, ref: any) => ( )} ); }; export default LoadingIcon;