This repository was archived by the owner on Feb 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -343,14 +343,45 @@ class TabBarBottom extends React.Component<BottomTabBarProps, State> {
343
343
const activeBackgroundColor = this . _getActiveBackgroundColor ( ) ;
344
344
const inactiveBackgroundColor = this . _getInactiveBackgroundColor ( ) ;
345
345
346
+ const {
347
+ position,
348
+ top,
349
+ left = 0 ,
350
+ bottom = 0 ,
351
+ right = 0 ,
352
+ margin,
353
+ marginTop,
354
+ marginLeft,
355
+ marginBottom,
356
+ marginRight,
357
+ marginHorizontal,
358
+ marginVertical,
359
+ ...innerStyle
360
+ } = StyleSheet . flatten ( style || { } ) ;
361
+
362
+ const containerStyle = {
363
+ position,
364
+ top,
365
+ left,
366
+ bottom,
367
+ right,
368
+ margin,
369
+ marginTop,
370
+ marginLeft,
371
+ marginBottom,
372
+ marginRight,
373
+ marginHorizontal,
374
+ marginVertical,
375
+ } ;
376
+
346
377
const tabBarStyle = [
347
378
styles . tabBar ,
348
379
isDark ? styles . tabBarDark : styles . tabBarLight ,
349
380
// @ts -ignore
350
381
this . _shouldUseHorizontalLabels ( ) && ! Platform . isPad
351
382
? styles . tabBarCompact
352
383
: styles . tabBarRegular ,
353
- style ,
384
+ innerStyle ,
354
385
] ;
355
386
356
387
return (
@@ -374,6 +405,7 @@ class TabBarBottom extends React.Component<BottomTabBarProps, State> {
374
405
position : this . state . keyboard ? 'absolute' : null ,
375
406
}
376
407
: null ,
408
+ containerStyle ,
377
409
] }
378
410
pointerEvents = {
379
411
keyboardHidesTabBar && this . state . keyboard ? 'none' : 'auto'
@@ -454,9 +486,6 @@ const styles = StyleSheet.create({
454
486
borderTopColor : ThemeColors . dark . headerBorder ,
455
487
} ,
456
488
container : {
457
- left : 0 ,
458
- right : 0 ,
459
- bottom : 0 ,
460
489
elevation : 8 ,
461
490
} ,
462
491
tabBarCompact : {
You can’t perform that action at this time.
0 commit comments