Skip to content

Commit 15f8ca9

Browse files
committed
Make ScrollableTabBar's height customable
1 parent 0757ed3 commit 15f8ca9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ScrollableTabBar.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const {
1212
Dimensions,
1313
} = ReactNative;
1414

15-
const TAB_HEIGHT = 50;
1615
const WINDOW_WIDTH = Dimensions.get('window').width;
1716

1817
const ScrollableTabBar = React.createClass({
@@ -169,7 +168,6 @@ const ScrollableTabBar = React.createClass({
169168
horizontal={true}
170169
showsHorizontalScrollIndicator={false}
171170
showsVerticalScrollIndicator={false}
172-
style={styles.scrollableContainer}
173171
directionalLockEnabled={true}
174172
scrollEventThrottle={16}
175173
bounces={false}
@@ -204,27 +202,23 @@ module.exports = ScrollableTabBar;
204202

205203
const styles = StyleSheet.create({
206204
tab: {
207-
height: TAB_HEIGHT - 1,
205+
height: 49,
208206
alignItems: 'center',
209207
justifyContent: 'center',
210208
paddingBottom: 30,
211209
paddingLeft: 20,
212210
paddingRight: 20,
213211
},
214212
container: {
215-
height: TAB_HEIGHT,
213+
height: 50,
216214
borderWidth: 1,
217215
borderTopWidth: 0,
218216
borderLeftWidth: 0,
219217
borderRightWidth: 0,
220218
borderBottomColor: '#ccc',
221219
},
222220
tabs: {
223-
height: TAB_HEIGHT - 1,
224221
flexDirection: 'row',
225222
justifyContent: 'space-around',
226223
},
227-
scrollableContainer: {
228-
height: TAB_HEIGHT,
229-
},
230224
});

0 commit comments

Comments
 (0)