From df61cb75901e4e9b5441fab3959a828a11f60596 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 16 May 2021 20:53:30 +0800 Subject: [PATCH] fix: tabBarGutter missing close https://github.com/ant-design/ant-design/issues/30526 --- src/TabNavList/OperationNode.tsx | 2 +- src/TabNavList/TabNode.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TabNavList/OperationNode.tsx b/src/TabNavList/OperationNode.tsx index d489fa6e..ec106aaa 100644 --- a/src/TabNavList/OperationNode.tsx +++ b/src/TabNavList/OperationNode.tsx @@ -141,7 +141,7 @@ function OperationNode( // ========================= Render ========================= const moreStyle: React.CSSProperties = { - [rtl ? 'marginLeft' : 'marginRight']: tabBarGutter, + [rtl ? 'marginRight' : 'marginLeft']: tabBarGutter, }; if (!tabs.length) { moreStyle.visibility = 'hidden'; diff --git a/src/TabNavList/TabNode.tsx b/src/TabNavList/TabNode.tsx index d68d675c..42493dad 100644 --- a/src/TabNavList/TabNode.tsx +++ b/src/TabNavList/TabNode.tsx @@ -47,9 +47,9 @@ function TabNode( const nodeStyle: React.CSSProperties = {}; if (tabPosition === 'top' || tabPosition === 'bottom') { - nodeStyle[rtl ? 'marginLeft' : 'marginRight'] = tabBarGutter; + nodeStyle[rtl ? 'marginRight' : 'marginLeft'] = tabBarGutter; } else { - nodeStyle.marginBottom = tabBarGutter; + nodeStyle.marginTop = tabBarGutter; } const removable = editable && closable !== false && !disabled;