mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
type: ref type optimization (#43703)
Co-authored-by: 我们去月球漫步 <13105694+flymetothemoon-wj@user.noreply.gitee.com>
This commit is contained in:
parent
c831145cf4
commit
ab8e10d2c6
@ -64,13 +64,7 @@ const LoadingIcon: React.FC<LoadingIconProps> = (props) => {
|
||||
onLeaveStart={getRealWidth}
|
||||
onLeaveActive={getCollapsedWidth}
|
||||
>
|
||||
{(
|
||||
{
|
||||
className: motionCls,
|
||||
style: motionStyle,
|
||||
}: { className?: string; style?: React.CSSProperties },
|
||||
ref: any,
|
||||
) => (
|
||||
{({ className: motionCls, style: motionStyle }, ref: React.Ref<HTMLSpanElement>) => (
|
||||
<InnerLoadingIcon
|
||||
prefixCls={prefixCls}
|
||||
className={className}
|
||||
|
@ -85,12 +85,12 @@ const FloatButton: React.ForwardRefRenderFunction<
|
||||
|
||||
return wrapSSR(
|
||||
props.href ? (
|
||||
<a ref={ref as React.LegacyRef<HTMLAnchorElement>} {...restProps} className={classString}>
|
||||
<a ref={ref as React.RefObject<HTMLAnchorElement>} {...restProps} className={classString}>
|
||||
{buttonNode}
|
||||
</a>
|
||||
) : (
|
||||
<button
|
||||
ref={ref as React.LegacyRef<HTMLButtonElement>}
|
||||
ref={ref as React.RefObject<HTMLButtonElement>}
|
||||
{...restProps}
|
||||
className={classString}
|
||||
type="button"
|
||||
|
Loading…
Reference in New Issue
Block a user