Skip to content

Commit

Permalink
chore: remove mergedTabPosition (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
kungege authored Aug 19, 2022
1 parent de602a9 commit 0a0e320
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ function Tabs(
value: id,
});

let mergedTabPosition = tabPosition;
if (mobile && !['left', 'right'].includes(tabPosition)) {
mergedTabPosition = 'top';
}

// Async generate id to avoid ssr mapping failed
useEffect(() => {
if (!id) {
Expand All @@ -166,7 +161,7 @@ function Tabs(
id: mergedId,
activeKey: mergedActiveKey,
animated: mergedAnimated,
tabPosition: mergedTabPosition,
tabPosition,
rtl,
mobile,
};
Expand Down Expand Up @@ -196,7 +191,7 @@ function Tabs(
id={id}
className={classNames(
prefixCls,
`${prefixCls}-${mergedTabPosition}`,
`${prefixCls}-${tabPosition}`,
{
[`${prefixCls}-mobile`]: mobile,
[`${prefixCls}-editable`]: editable,
Expand Down

1 comment on commit 0a0e320

@vercel
Copy link

@vercel vercel bot commented on 0a0e320 Aug 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tabs – ./

tabs-react-component.vercel.app
tabs-git-master-react-component.vercel.app

Please sign in to comment.