Skip to content

Commit

Permalink
fix: Tabs tabBarGutter wrong style (ant-design#31469)
Browse files Browse the repository at this point in the history
* chore: upgrade rc-tabs

* fix: Tabs tabBarGutter bugs

1. first tab should not have gutter
2. add button lost gutter
3. rtl issue

close ant-design#31462

* fix snapshot
  • Loading branch information
afc163 authored Jul 22, 2021
1 parent dece677 commit 568a999
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 0 additions & 2 deletions components/tabs/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ exports[`Tabs tabBarGutter should work 1`] = `
>
<div
class="ant-tabs-tab ant-tabs-tab-active"
style="margin-left:0"
>
<div
aria-selected="true"
Expand Down Expand Up @@ -246,7 +245,6 @@ exports[`Tabs tabBarGutter should work 2`] = `
>
<div
class="ant-tabs-tab ant-tabs-tab-active"
style="margin-top:0"
>
<div
aria-selected="true"
Expand Down
1 change: 1 addition & 0 deletions components/tabs/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@

.@{tab-prefix-cls}-nav-add {
min-width: @tabs-card-height;
margin-left: @tabs-card-gutter;
padding: 0 @padding-xs;
background: @tabs-card-head-background;
border: @border-width-base @border-style-base @border-color-split;
Expand Down
10 changes: 8 additions & 2 deletions components/tabs/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,14 @@
> div > .@{tab-prefix-cls}-nav {
.@{tab-prefix-cls}-tab + .@{tab-prefix-cls}-tab {
.@{tab-prefix-cls}-rtl& {
margin-right: 0;
margin-left: @tabs-card-gutter;
margin-right: @tabs-card-gutter;
margin-left: 0;
}
}
.@{tab-prefix-cls}-nav-add {
.@{tab-prefix-cls}-rtl& {
margin-right: @tabs-card-gutter;
margin-left: 0;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"rc-steps": "~4.1.0",
"rc-switch": "~3.2.0",
"rc-table": "~7.15.1",
"rc-tabs": "~11.9.1",
"rc-tabs": "~11.10.0",
"rc-textarea": "~0.3.0",
"rc-tooltip": "~5.1.1",
"rc-tree": "~4.2.1",
Expand Down

0 comments on commit 568a999

Please sign in to comment.