Skip to content

Commit

Permalink
feat: expose tabBarGap option in material top tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlecoq committed Nov 28, 2022
1 parent 61ffc24 commit c1c70c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/material-top-tabs/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ export type MaterialTopTabNavigationOptions = {
*/
tabBarStyle?: StyleProp<ViewStyle>;

/**
* Gap between tabs
*/
tabBarGap?: number;

/**
* Whether to enable swipe gestures when this screen is focused.
* Swipe gestures are enabled by default. Passing `false` will disable swipe gestures,
Expand Down
1 change: 1 addition & 0 deletions packages/material-top-tabs/src/views/MaterialTopTabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default function TabBarTop({
{ backgroundColor: colors.primary },
focusedOptions.tabBarIndicatorStyle,
]}
gap={focusedOptions.tabBarGap}
indicatorContainerStyle={focusedOptions.tabBarIndicatorContainerStyle}
contentContainerStyle={focusedOptions.tabBarContentContainerStyle}
style={[{ backgroundColor: colors.card }, focusedOptions.tabBarStyle]}
Expand Down

0 comments on commit c1c70c3

Please sign in to comment.