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

Commit

Permalink
feat: add contentContainerStyle to TabBar (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
nervouself authored and satya164 committed Feb 24, 2019
1 parent 3632e22 commit e2b3af9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -392,6 +392,10 @@ Style to apply to the active indicator.

Style to apply to the tab item label.

##### `contentContainerStyle`

Style to apply to the inner container for tabs.

##### `style`

Style to apply to the tab bar container.
Expand Down
3 changes: 3 additions & 0 deletions src/TabBar.js
Expand Up @@ -48,6 +48,7 @@ export type Props<T> = {|
tabStyle?: ViewStyleProp,
indicatorStyle?: ViewStyleProp,
labelStyle?: TextStyleProp,
contentContainerStyle?: ViewStyleProp,
style?: ViewStyleProp,
|};

Expand Down Expand Up @@ -257,6 +258,7 @@ export default class TabBar<T: Route> extends React.Component<Props<T>, State> {
tabStyle,
labelStyle,
indicatorStyle,
contentContainerStyle,
style,
} = this.props;
const { routes } = navigationState;
Expand Down Expand Up @@ -300,6 +302,7 @@ export default class TabBar<T: Route> extends React.Component<Props<T>, State> {
contentContainerStyle={[
styles.tabContent,
scrollEnabled ? null : styles.container,
contentContainerStyle,
]}
scrollEventThrottle={16}
onScroll={Animated.event(
Expand Down

0 comments on commit e2b3af9

Please sign in to comment.