fix: fixed the issue that when the Alert is in closable, the icon will be covered by the text.

pull/398/head
tangjinzhou 2019-01-02 20:55:00 +08:00
parent 43a503fc9e
commit daccfd19d1
1 changed files with 6 additions and 5 deletions

View File

@ -103,19 +103,20 @@ const Alert = {
}
}
// closeable when closeText is assigned
if (closeText) {
closable = true
}
const alertCls = classNames(prefixCls, {
[`${prefixCls}-${type}`]: true,
[`${prefixCls}-close`]: !closing,
[`${prefixCls}-with-description`]: !!description,
[`${prefixCls}-no-icon`]: !showIcon,
[`${prefixCls}-banner`]: !!banner,
[`${prefixCls}-closable`]: closable,
})
// closeable when closeText is assigned
if (closeText) {
closable = true
}
const closeIcon = closable ? (
<a onClick={this.handleClose} class={`${prefixCls}-close-icon`}>
{closeText || <Icon type='close' />}