From c1a20eac55222f76698e4bfa80b353ffd576e6ae Mon Sep 17 00:00:00 2001 From: Phillip Date: Thu, 22 May 2025 17:37:02 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20TabView=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=EC=97=90=20swipe=20=EC=82=AC=EC=9A=A9=20=EC=97=AC?= =?UTF-8?q?=EB=B6=80=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx | 3 ++- .../src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts | 1 + packages/vibrant-core/src/lib/TabView/TabView.native.tsx | 3 ++- packages/vibrant-core/src/lib/TabView/TabViewProps.ts | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx index 7986a444b..c4ec0eeda 100644 --- a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx +++ b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx @@ -11,7 +11,7 @@ import type { ViewPagerTabGroupProps } from './ViewPagerTabGroupProps'; import { withViewPagerTabGroupVariation } from './ViewPagerTabGroupProps'; export const ViewPagerTabGroup = withViewPagerTabGroupVariation( - ({ children, tabId, testId, onTabChange, tabSpacing }) => ( + ({ children, tabId, testId, onTabChange, tabSpacing, native_swipeEnabled = true }) => ( )} onTabChange={onTabChange} + native_swipeEnabled={native_swipeEnabled} > {children} diff --git a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts index f00f71858..4992f1bfd 100644 --- a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts +++ b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts @@ -8,6 +8,7 @@ export type ViewPagerTabGroupProps = { tabId?: string; onTabChange?: () => void; testId?: string; + native_swipeEnabled?: boolean; }; export const withViewPagerTabGroupVariation = withVariation('ViewPagerTabGroup')(); diff --git a/packages/vibrant-core/src/lib/TabView/TabView.native.tsx b/packages/vibrant-core/src/lib/TabView/TabView.native.tsx index 2fb07e5c7..4bba26f47 100644 --- a/packages/vibrant-core/src/lib/TabView/TabView.native.tsx +++ b/packages/vibrant-core/src/lib/TabView/TabView.native.tsx @@ -7,7 +7,7 @@ import type { TabViewItemProps } from '../TabViewItem'; import { withTabViewVariation } from './TabViewProps'; export const TabView = withTabViewVariation( - ({ children, tabId, onTabChange, renderTobBarContainer, renderTobBarItem }) => { + ({ children, tabId, onTabChange, renderTobBarContainer, renderTobBarItem, native_swipeEnabled = true }) => { const childrenElement = Children.toArray(children).filter(isValidElement); const [currentIndex, setCurrentIndex] = useState( Math.max( @@ -75,6 +75,7 @@ export const TabView = withTabViewVariation( navigationState={{ index: currentIndex, routes }} renderScene={renderScene} onIndexChange={setCurrentIndex} + swipeEnabled={native_swipeEnabled} /> ); } diff --git a/packages/vibrant-core/src/lib/TabView/TabViewProps.ts b/packages/vibrant-core/src/lib/TabView/TabViewProps.ts index 9ee82467d..5edd0d77b 100644 --- a/packages/vibrant-core/src/lib/TabView/TabViewProps.ts +++ b/packages/vibrant-core/src/lib/TabView/TabViewProps.ts @@ -10,6 +10,7 @@ type TabViewProps = { renderTobBarContainer: (props: ReactElementChildren) => ReactElement; onTabChange?: () => void; testId?: string; + native_swipeEnabled?: boolean; }; export const withTabViewVariation = withVariation('TabView')();