From b06e2567b6a9112114a1be673b7c18598865ed5c Mon Sep 17 00:00:00 2001 From: zxyao Date: Mon, 6 Jul 2020 16:03:12 +0800 Subject: [PATCH] docs(comment): like and dislike number event binding #25437 (#25444) * 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 --- .../__tests__/__snapshots__/demo.test.js.snap | 2 -- components/comment/demo/basic.md | 28 ++++++++----------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/components/comment/__tests__/__snapshots__/demo.test.js.snap b/components/comment/__tests__/__snapshots__/demo.test.js.snap index f729c80552..80f5d689e1 100644 --- a/components/comment/__tests__/__snapshots__/demo.test.js.snap +++ b/components/comment/__tests__/__snapshots__/demo.test.js.snap @@ -56,7 +56,6 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = ` aria-label="like" class="anticon anticon-like" role="img" - tabindex="-1" > - - {createElement(action === 'liked' ? LikeFilled : LikeOutlined, { - onClick: like, - })} - - {likes} - , - - - {React.createElement(action === 'disliked' ? DislikeFilled : DislikeOutlined, { - onClick: dislike, - })} - - {dislikes} - , + + + {createElement(action === 'liked' ? LikeFilled : LikeOutlined)} + {likes} + + , + + + {React.createElement(action === 'disliked' ? DislikeFilled : DislikeOutlined)} + {dislikes} + + , Reply to, ];