Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(badge): fix badge number is rtl #43998

Merged
merged 7 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] =
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
dir="auto"
title="1"
>
<span
Expand Down Expand Up @@ -84,6 +85,7 @@ exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] =
<sup
class="ant-scroll-number ant-badge-dot"
data-show="true"
dir="auto"
/>
</span>
</div>
Expand Down Expand Up @@ -529,6 +531,7 @@ Array [
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
dir="auto"
title="1"
>
<span
Expand Down Expand Up @@ -576,6 +579,7 @@ Array [
<sup
class="ant-scroll-number ant-badge-dot"
data-show="true"
dir="auto"
/>
</span>
</div>
Expand Down
4 changes: 4 additions & 0 deletions components/avatar/__tests__/__snapshots__/demo.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
dir="auto"
title="1"
>
<span
Expand Down Expand Up @@ -84,6 +85,7 @@ exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-dot"
data-show="true"
dir="auto"
/>
</span>
</div>
Expand Down Expand Up @@ -436,6 +438,7 @@ Array [
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
dir="auto"
title="1"
>
<span
Expand Down Expand Up @@ -483,6 +486,7 @@ Array [
<sup
class="ant-scroll-number ant-badge-dot"
data-show="true"
dir="auto"
/>
</span>
</div>
Expand Down
1 change: 1 addition & 0 deletions components/badge/ScrollNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const ScrollNumber = React.forwardRef<HTMLElement, ScrollNumberProps>((props, re
style,
className: classNames(prefixCls, className, motionClassName),
title: title as string,
dir: 'auto',
};

// Only integer need motion
Expand Down