refactor(button): change bool type (#49156)

This commit is contained in:
ice 2024-05-31 15:19:25 +08:00 committed by GitHub
parent 9d134859be
commit 664f3e6b2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,7 @@ const InternalCompoundedButton = React.forwardRef<
loading = false,
prefixCls: customizePrefixCls,
type,
danger,
danger = false,
shape = 'default',
size: customizeSize,
styles,
@ -220,7 +220,7 @@ const InternalCompoundedButton = React.forwardRef<
[`${prefixCls}-loading`]: innerLoading,
[`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && mergedInsertSpace && !innerLoading,
[`${prefixCls}-block`]: block,
[`${prefixCls}-dangerous`]: !!danger,
[`${prefixCls}-dangerous`]: danger,
[`${prefixCls}-rtl`]: direction === 'rtl',
},
compactItemClassnames,
@ -250,7 +250,7 @@ const InternalCompoundedButton = React.forwardRef<
<LoadingIcon
existIcon={!!icon}
prefixCls={prefixCls}
loading={!!innerLoading}
loading={innerLoading}
iconPosition={iconPosition}
/>
);
@ -308,7 +308,7 @@ const InternalCompoundedButton = React.forwardRef<
if (!isUnBorderedButtonType(mergedType)) {
buttonNode = (
<Wave component="Button" disabled={!!innerLoading}>
<Wave component="Button" disabled={innerLoading}>
{buttonNode}
</Wave>
);