|
@ -52,7 +52,7 @@ export default class Tag extends React.Component { |
|
|
this.props, |
|
|
this.props, |
|
|
['prefixCls', 'closable', 'color','className','children'] |
|
|
['prefixCls', 'closable', 'color','className','children'] |
|
|
); |
|
|
); |
|
|
const close = closable ? <Icon type="cross" onClick={this.close} /> : ''; |
|
|
const closeIcon = closable ? <Icon type="cross" onClick={this.close} /> : ''; |
|
|
const classString = classNames({ |
|
|
const classString = classNames({ |
|
|
[prefixCls]: true, |
|
|
[prefixCls]: true, |
|
|
[`${prefixCls}-${color}`]: !!color, |
|
|
[`${prefixCls}-${color}`]: !!color, |
|
@ -74,7 +74,7 @@ export default class Tag extends React.Component { |
|
|
{this.state.closed ? null : ( |
|
|
{this.state.closed ? null : ( |
|
|
<div data-show={!this.state.closing} {...divProps} className={classString}> |
|
|
<div data-show={!this.state.closing} {...divProps} className={classString}> |
|
|
<span className={`${prefixCls}-text`}>{children}</span> |
|
|
<span className={`${prefixCls}-text`}>{children}</span> |
|
|
{close} |
|
|
{closeIcon} |
|
|
</div> |
|
|
</div> |
|
|
)} |
|
|
)} |
|
|
</Animate> |
|
|
</Animate> |
|
|