diff --git a/components/button/style/index.ts b/components/button/style/index.ts index 42adc9054e..3260e5f7f9 100644 --- a/components/button/style/index.ts +++ b/components/button/style/index.ts @@ -698,7 +698,6 @@ const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation => [iconCls]: { fontSize: buttonIconOnlyFontSize, - verticalAlign: 'calc(-0.125em - 1px)', }, }, }, diff --git a/components/button/style/token.ts b/components/button/style/token.ts index 5896ac408c..42f476994b 100644 --- a/components/button/style/token.ts +++ b/components/button/style/token.ts @@ -160,17 +160,17 @@ export interface ComponentToken { * @desc 只有图标的按钮图标尺寸 * @descEN Icon size of button which only contains icon */ - onlyIconSize: number; + onlyIconSize: number | string; /** * @desc 大号只有图标的按钮图标尺寸 * @descEN Icon size of large button which only contains icon */ - onlyIconSizeLG: number; + onlyIconSizeLG: number | string; /** * @desc 小号只有图标的按钮图标尺寸 * @descEN Icon size of small button which only contains icon */ - onlyIconSizeSM: number; + onlyIconSizeSM: number | string; /** * @desc 按钮组边框颜色 * @descEN Border color of button group @@ -233,7 +233,7 @@ export interface ButtonToken extends FullToken<'Button'> { * @desc 只有图标的按钮图标尺寸 * @descEN Icon size of button which only contains icon */ - buttonIconOnlyFontSize: number; + buttonIconOnlyFontSize: number | string; } export const prepareToken: (token: Parameters>[0]) => ButtonToken = ( @@ -275,9 +275,9 @@ export const prepareComponentToken: GetDefaultToken<'Button'> = (token) => { paddingInline: token.paddingContentHorizontal - token.lineWidth, paddingInlineLG: token.paddingContentHorizontal - token.lineWidth, paddingInlineSM: 8 - token.lineWidth, - onlyIconSize: token.fontSizeLG, - onlyIconSizeSM: token.fontSizeLG - 2, - onlyIconSizeLG: token.fontSizeLG + 2, + onlyIconSize: 'inherit', + onlyIconSizeSM: 'inherit', + onlyIconSizeLG: 'inherit', groupBorderColor: token.colorPrimaryHover, linkHoverBg: 'transparent', textTextColor: token.colorText,