diff --git a/README.md b/README.md index bbafb657..085a94a9 100644 --- a/README.md +++ b/README.md @@ -331,6 +331,10 @@ Object containing the initial height and width of the screens. Passing this will Style to apply to the view wrapping each screen. You can pass this to override some default styles such as overflow clipping: +##### `pagerStyle` + +Style to apply to the pager view wrapping all the scenes. + ##### `style` Style to apply to the tab view container. diff --git a/src/TabView.tsx b/src/TabView.tsx index 17d6515a..59d951bf 100644 --- a/src/TabView.tsx +++ b/src/TabView.tsx @@ -30,6 +30,7 @@ export type Props = PagerProps & { lazy?: ((props: { route: T }) => boolean) | boolean; lazyPreloadDistance?: number; sceneContainerStyle?: StyleProp; + pagerStyle?: StyleProp; style?: StyleProp; }; @@ -46,6 +47,7 @@ export default function TabView({ renderLazyPlaceholder = () => null, renderTabBar = (props) => , sceneContainerStyle, + pagerStyle, style, swipeEnabled = true, tabBarPosition = 'top', @@ -86,6 +88,7 @@ export default function TabView({ onSwipeEnd={onSwipeEnd} onIndexChange={jumpToIndex} animationEnabled={animationEnabled} + style={pagerStyle} > {({ position, render, addEnterListener, jumpTo }) => { // All of the props here must not change between re-renders