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> </LocaleReceiver>
); );
const closeIconToRender = closeIcon || ( const closeIconToRender = (
<span className={`${prefixCls}-close-x`}> <span className={`${prefixCls}-close-x`}>
<Icon className={`${prefixCls}-close-icon`} type="close" /> {closeIcon || <Icon className={`${prefixCls}-close-icon`} type="close" />}
</span> </span>
); );

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

Loading…
Cancel
Save