mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
* fix(comment): like and dislike number cursor style(#25437) * docs: modify like and dislike DOM order and onclick event binding * fix: key missing for actions array * fix: add test snapshot * fix: modify test snapshot
This commit is contained in:
parent
6a32e8a40b
commit
b06e2567b6
@ -56,7 +56,6 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = `
|
||||
aria-label="like"
|
||||
class="anticon anticon-like"
|
||||
role="img"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -86,7 +85,6 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = `
|
||||
aria-label="dislike"
|
||||
class="anticon anticon-dislike"
|
||||
role="img"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -37,22 +37,18 @@ const Demo = () => {
|
||||
};
|
||||
|
||||
const actions = [
|
||||
<span key="comment-basic-like">
|
||||
<Tooltip title="Like">
|
||||
{createElement(action === 'liked' ? LikeFilled : LikeOutlined, {
|
||||
onClick: like,
|
||||
})}
|
||||
</Tooltip>
|
||||
<Tooltip key="comment-basic-like" title="Like">
|
||||
<span onClick={like}>
|
||||
{createElement(action === 'liked' ? LikeFilled : LikeOutlined)}
|
||||
<span className="comment-action">{likes}</span>
|
||||
</span>,
|
||||
<span key="comment-basic-dislike">
|
||||
<Tooltip title="Dislike">
|
||||
{React.createElement(action === 'disliked' ? DislikeFilled : DislikeOutlined, {
|
||||
onClick: dislike,
|
||||
})}
|
||||
</Tooltip>
|
||||
</span>
|
||||
</Tooltip>,
|
||||
<Tooltip key="comment-basic-dislike" title="Dislike">
|
||||
<span onClick={dislike}>
|
||||
{React.createElement(action === 'disliked' ? DislikeFilled : DislikeOutlined)}
|
||||
<span className="comment-action">{dislikes}</span>
|
||||
</span>,
|
||||
</span>
|
||||
</Tooltip>,
|
||||
<span key="comment-basic-reply-to">Reply to</span>,
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user