From 0d5f4ff95c6980499b09a42e704ae095d7a465d6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 19 Nov 2024 17:31:13 +0800 Subject: [PATCH] chore: remove useless var (#51689) --- components/button/style/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/components/button/style/index.ts b/components/button/style/index.ts index 9b44062b9b..7a3346d09c 100644 --- a/components/button/style/index.ts +++ b/components/button/style/index.ts @@ -525,10 +525,11 @@ const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation => buttonPaddingHorizontal, iconCls, buttonPaddingVertical, + motionDurationSlow, + motionEaseInOut, + buttonIconOnlyFontSize, + opacityLoading, } = token; - - const iconOnlyCls = `${componentCls}-icon-only`; - return [ { [prefixCls]: { @@ -538,7 +539,7 @@ const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation => padding: `${unit(buttonPaddingVertical!)} ${unit(buttonPaddingHorizontal!)}`, borderRadius, - [`&${iconOnlyCls}`]: { + [`&${componentCls}-icon-only`]: { width: controlHeight, paddingInline: 0, @@ -552,22 +553,21 @@ const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation => }, [iconCls]: { - fontSize: token.buttonIconOnlyFontSize, + fontSize: buttonIconOnlyFontSize, }, }, // Loading [`&${componentCls}-loading`]: { - opacity: token.opacityLoading, + opacity: opacityLoading, cursor: 'default', }, [`${componentCls}-loading-icon`]: { - transition: `width ${token.motionDurationSlow} ${token.motionEaseInOut}, opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`, + transition: `width ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow} ${motionEaseInOut}`, }, }, }, - // Shape - patch prefixCls again to override solid border radius style { [`${componentCls}${componentCls}-circle${prefixCls}`]: genCircleButtonStyle(token),