Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Commit 77dec4f

Browse files
authored
feat: expose the style prop accepted by the Pager component (#1260)
1 parent 86e66d0 commit 77dec4f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ Object containing the initial height and width of the screens. Passing this will
331331

332332
Style to apply to the view wrapping each screen. You can pass this to override some default styles such as overflow clipping:
333333

334+
##### `pagerStyle`
335+
336+
Style to apply to the pager view wrapping all the scenes.
337+
334338
##### `style`
335339

336340
Style to apply to the tab view container.

src/TabView.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type Props<T extends Route> = PagerProps & {
3030
lazy?: ((props: { route: T }) => boolean) | boolean;
3131
lazyPreloadDistance?: number;
3232
sceneContainerStyle?: StyleProp<ViewStyle>;
33+
pagerStyle?: StyleProp<ViewStyle>;
3334
style?: StyleProp<ViewStyle>;
3435
};
3536

@@ -46,6 +47,7 @@ export default function TabView<T extends Route>({
4647
renderLazyPlaceholder = () => null,
4748
renderTabBar = (props) => <TabBar {...props} />,
4849
sceneContainerStyle,
50+
pagerStyle,
4951
style,
5052
swipeEnabled = true,
5153
tabBarPosition = 'top',
@@ -84,6 +86,7 @@ export default function TabView<T extends Route>({
8486
onSwipeStart={onSwipeStart}
8587
onSwipeEnd={onSwipeEnd}
8688
onIndexChange={jumpToIndex}
89+
style={pagerStyle}
8790
>
8891
{({ position, render, addEnterListener, jumpTo }) => {
8992
// All of the props here must not change between re-renders

0 commit comments

Comments
 (0)