ant-design-icons icon indicating copy to clipboard operation
ant-design-icons copied to clipboard

Ant design button组件 loading属性表现错误

Open llr101 opened this issue 4 years ago • 1 comments

更新icons到4.3.0后出现Button loading加载图标显示错误?

llr101 avatar Nov 14 '20 15:11 llr101

I have the same issue. After upgrading and-design-icons to 4.3.0, the animation of the loading icon looks strange when using the loading prop on an antd Button component. When providing a LoadingOutlined component to the icon prop of the button directly instead of using the loading prop, it does work properly.

Looks like this PR causes the issue: https://github.com/ant-design/ant-design-icons/pull/331

The spinner class is now applied to the parent (span) element of the loading icon svg, instead of to the svg element itself. Because antd sets a padding-right to that span when using the loading prop, that padding is now also being rotated, causing the animation to look very strange. Reproduced with antd 4.8.2 and ant-design-icons 4.3.0.

ghost avatar Nov 15 '20 22:11 ghost