Skip to content

Commit

Permalink
fix: Tag component close icon display bug (#27226)
Browse files Browse the repository at this point in the history
* fix: tag component close icon display bug

* update tag component demo.test.snap
  • Loading branch information
handycode committed Oct 19, 2020
1 parent d3d3947 commit fd0a513
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions components/tag/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -518,7 +518,7 @@ Array [
/>
</svg>
</span>
</div>
</span>
</span>,
]
`;
Expand Down
4 changes: 2 additions & 2 deletions components/tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
);
Expand Down

0 comments on commit fd0a513

Please sign in to comment.