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

View File

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