Browse Source

fix: Tabs tabBarGutter wrong style (#31469)

* chore: upgrade rc-tabs

* fix: Tabs tabBarGutter bugs

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

close #31462

* fix snapshot
pull/31490/head
afc163 3 years ago
committed by GitHub
parent
commit
568a999137
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/tabs/__tests__/__snapshots__/index.test.js.snap
  2. 1
      components/tabs/style/index.less
  3. 10
      components/tabs/style/rtl.less
  4. 2
      package.json

2
components/tabs/__tests__/__snapshots__/index.test.js.snap

@ -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"
@ -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"

1
components/tabs/style/index.less

@ -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;

10
components/tabs/style/rtl.less

@ -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;
}
}
}

2
package.json

@ -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",

Loading…
Cancel
Save