mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: make loading work with icon only button in button group, close: #6822
This commit is contained in:
parent
4960f711c3
commit
2413c6af61
@ -336,7 +336,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
|
||||
class="ant-input-suffix"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-primary ant-btn-lg search-btn"
|
||||
class="ant-btn search-btn ant-btn-primary ant-btn-lg"
|
||||
type="button"
|
||||
>
|
||||
<i
|
||||
|
@ -149,15 +149,15 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
break;
|
||||
}
|
||||
|
||||
const classes = classNames(prefixCls, {
|
||||
const classes = classNames(prefixCls, className, {
|
||||
[`${prefixCls}-${type}`]: type,
|
||||
[`${prefixCls}-${shape}`]: shape,
|
||||
[`${prefixCls}-${sizeCls}`]: sizeCls,
|
||||
[`${prefixCls}-icon-only`]: !children && icon,
|
||||
[`${prefixCls}-icon-only`]: !children && icon && !loading,
|
||||
[`${prefixCls}-loading`]: loading,
|
||||
[`${prefixCls}-clicked`]: clicked,
|
||||
[`${prefixCls}-background-ghost`]: ghost,
|
||||
}, className);
|
||||
});
|
||||
|
||||
const iconType = loading ? 'loading' : icon;
|
||||
const iconNode = iconType ? <Icon type={iconType} /> : null;
|
||||
|
@ -26,7 +26,7 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="ant-btn ant-btn-default ant-dropdown-trigger"
|
||||
class="ant-btn ant-dropdown-trigger ant-btn-default"
|
||||
type="button"
|
||||
>
|
||||
<i
|
||||
@ -48,7 +48,7 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="ant-btn ant-btn-default ant-dropdown-trigger"
|
||||
class="ant-btn ant-dropdown-trigger ant-btn-default"
|
||||
disabled=""
|
||||
type="button"
|
||||
>
|
||||
|
@ -1204,7 +1204,7 @@ exports[`renders ./components/form/demo/normal-login.md correctly 1`] = `
|
||||
Forgot password
|
||||
</a>
|
||||
<button
|
||||
class="ant-btn ant-btn-primary ant-btn-lg login-form-button"
|
||||
class="ant-btn login-form-button ant-btn-primary ant-btn-lg"
|
||||
type="submit"
|
||||
>
|
||||
<span>
|
||||
|
@ -421,7 +421,7 @@ exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
|
||||
/>
|
||||
</span>
|
||||
<button
|
||||
class="ant-btn ant-btn-primary upload-demo-start"
|
||||
class="ant-btn upload-demo-start ant-btn-primary"
|
||||
disabled=""
|
||||
type="button"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user