Skip to content

Commit

Permalink
refactor: review <LoadingIcon /> simplify it a bit and drop dead func…
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-matvejev authored and vouis committed Dec 10, 2020
1 parent d388ea0 commit 1eec1d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/button/LoadingIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import classNames from 'classnames';
import React from 'react';
import CSSMotion from 'rc-motion';
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';

Expand All @@ -8,7 +7,6 @@ export interface LoadingIconProps {
existIcon: boolean;
loading?: boolean | object;
}

const getCollapsedWidth = () => ({ width: 0, opacity: 0, transform: 'scale(0)' });
const getRealWidth = (node: HTMLElement) => ({
width: node.scrollWidth,
Expand Down Expand Up @@ -43,7 +41,7 @@ const LoadingIcon: React.FC<LoadingIconProps> = ({ prefixCls, loading, existIcon
{({ className, style }: { className?: string; style?: React.CSSProperties }, ref: any) => {
return (
<span className={`${prefixCls}-loading-icon`} style={style} ref={ref}>
<LoadingOutlined className={classNames(className)} />
<LoadingOutlined className={className} />
</span>
);
}}
Expand Down

0 comments on commit 1eec1d1

Please sign in to comment.