fix: model close (#18323)

* 💄 support Modal closeIcon

close #18307

* 🐛 closeIcon should put into span

https://github.com/ant-design/ant-design/pull/18309/files#r314946527
pull/18327/head
偏右 6 years ago committed by GitHub
parent a767a495b0
commit 9b3ac9bbd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,9 +223,9 @@ export default class Modal extends React.Component<ModalProps, {}> {
</LocaleReceiver>
);
const closeIconToRender = closeIcon || (
const closeIconToRender = (
<span className={`${prefixCls}-close-x`}>
<Icon className={`${prefixCls}-close-icon`} type="close" />
{closeIcon || <Icon className={`${prefixCls}-close-icon`} type="close" />}
</span>
);

@ -198,9 +198,13 @@ exports[`Modal support closeIcon 1`] = `
class="ant-modal-close"
type="button"
>
<a>
closeIcon
</a>
<span
class="ant-modal-close-x"
>
<a>
closeIcon
</a>
</span>
</button>
<div
class="ant-modal-body"

Loading…
Cancel
Save