fix: Tag component close icon display bug (#27226)

* fix: tag component close icon display bug

* update tag component demo.test.snap
This commit is contained in:
handy 2020-10-19 18:27:20 +08:00 committed by GitHub
parent d3d394700b
commit fd0a513718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -482,17 +482,17 @@ Array [
class="ant-tag" class="ant-tag"
> >
Tag1 Tag1
<div <span
class="ant-tag-close-icon" class="ant-tag-close-icon"
> >
关 闭 关 闭
</div> </span>
</span>, </span>,
<span <span
class="ant-tag" class="ant-tag"
> >
Tag2 Tag2
<div <span
class="ant-tag-close-icon" class="ant-tag-close-icon"
> >
<span <span
@ -518,7 +518,7 @@ Array [
/> />
</svg> </svg>
</span> </span>
</div> </span>
</span>, </span>,
] ]
`; `;

View File

@ -102,9 +102,9 @@ const InternalTag: React.ForwardRefRenderFunction<unknown, TagProps> = (
const renderCloseIcon = () => { const renderCloseIcon = () => {
if (closable) { if (closable) {
return closeIcon ? ( return closeIcon ? (
<div className={`${prefixCls}-close-icon`} onClick={handleCloseClick}> <span className={`${prefixCls}-close-icon`} onClick={handleCloseClick}>
{closeIcon} {closeIcon}
</div> </span>
) : ( ) : (
<CloseOutlined className={`${prefixCls}-close-icon`} onClick={handleCloseClick} /> <CloseOutlined className={`${prefixCls}-close-icon`} onClick={handleCloseClick} />
); );