You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2022. It is now read-only.
@@ -86,9 +87,10 @@ The package exposes the following components,
86
87
87
88
### `<TabViewAnimated />`
88
89
89
-
Container component responsible for managing tab transitions
90
+
Container component responsible for managing tab transitions.
91
+
92
+
#### Props
90
93
91
-
It accepts the following props,
92
94
-`navigationState` - the current navigation state
93
95
-`onRequestChangeTab` - callback for when the current tab changes, should do the `setState`
94
96
-`onChangePosition` - callback called with position value as it changes (e.g. - on swipe or tab change), avoid doing anything expensive here
@@ -104,9 +106,10 @@ Any other props are passed to the underlying pager.
104
106
105
107
### `<TabViewPagerPan />`
106
108
107
-
Pager component based on `PanResponder`
109
+
Pager component based on `PanResponder`.
110
+
111
+
#### Props
108
112
109
-
It accepts the following props,
110
113
-`configureTransition` - optional callback which returns a configuration for the transition
111
114
-`animationEnabled` - whether to enable page change animation
112
115
-`swipeEnabled` - whether to enable swipe gestures
@@ -116,39 +119,42 @@ It accepts the following props,
116
119
117
120
### `<TabViewPagerScroll />`
118
121
119
-
Pager component based on `ScrollView` (default on iOS)
122
+
Pager component based on `ScrollView` (default on iOS).
123
+
124
+
#### Props
120
125
121
-
It accepts the following props,
122
126
-`animationEnabled` - whether to enable page change animation
123
127
-`swipeEnabled` - whether to enable swipe gestures
124
128
-`children` - React Element(s) to render
125
129
126
130
### `<TabViewPagerAndroid />`
127
131
128
-
Pager component based on `ViewPagerAndroid` (default on Android)
132
+
Pager component based on `ViewPagerAndroid` (default on Android).
133
+
134
+
#### Props
129
135
130
-
It accepts the following props,
131
136
-`animationEnabled` - whether to enable page change animation
132
137
-`swipeEnabled` - whether to enable swipe gestures
133
138
-`children` - React Element(s) to render
134
139
135
140
### `<TabBar />`
136
141
137
-
Material design themed top tab bar
142
+
Material design themed tab bar. Can be used as both top and bottom tab bar.
143
+
144
+
#### Props
138
145
139
-
It accepts the following props,
140
146
-`getLabelText` - optional callback which receives the current scene and returns the tab label
141
147
-`renderIcon` - optional callback which receives the current scene and returns a React Element to be used as a icon
142
148
-`renderLabel` - optional callback which receives the current scene and returns a React Element to be used as a label
143
149
-`renderIndicator` - optional callback which receives the current scene and returns a React Element to be used as a tab indicator
144
150
-`renderBadge` - optional callback which receives the current scene and returns a React Element to be used as a badge
145
-
-`onTabPress` - optional callback invoked on tab press, useful for things like scroll to top; receives the scene of the tab that was pressed
151
+
-`onTabPress` - optional callback invoked on tab press which receives the scene for the pressed tab, useful for things like scroll to top
146
152
-`pressColor` - color for material ripple (Android >= 5.0 only)
147
153
-`pressOpacity` - opacity for pressed tab (iOS and Android < 5.0 only)
148
154
-`scrollEnabled` - whether to enable scrollable tabs
149
-
-`tabStyle` - style object for the tab
150
-
-`indicatorStyle` - style object for the tab indicator
151
-
-`labelStyle` - style object for the tab label
155
+
-`tabStyle` - style object for the individual tabs in the tab bar
156
+
-`indicatorStyle` - style object for the active indicator
157
+
-`labelStyle` - style object for the tab item label
152
158
-`style` - style object for the tab bar
153
159
154
160
@@ -159,7 +165,7 @@ Check the [type definitions](src/TabViewTypeDefinitions.js) for details on shape
159
165
160
166
`<TabViewAnimated />` is a `PureComponent` to prevent unnecessary re-rendering. As a side-effect, the tabs won't re-render if something changes in the parent's state/props. If you need it to trigger a re-render, put it in the `navigationState`.
161
167
162
-
For example, consider you have a `loaded` property on state which should trigger re-render. You can have your state like the following -
168
+
For example, consider you have a `loaded` property on state which should trigger re-render. You can have your state like the following:
0 commit comments