Revert adding SafeAreaView to TabBarTop

This commit is contained in:
Brent Vatne 2018-01-16 11:12:06 -08:00
parent abbd88601f
commit 8cf2953115

View File

@ -4,7 +4,6 @@ import * as React from 'react';
import { Animated, StyleSheet } from 'react-native'; import { Animated, StyleSheet } from 'react-native';
import { TabBar } from 'react-native-tab-view'; import { TabBar } from 'react-native-tab-view';
import TabBarIcon from './TabBarIcon'; import TabBarIcon from './TabBarIcon';
import SafeAreaView from '../SafeAreaView';
import type { import type {
NavigationAction, NavigationAction,
@ -84,16 +83,12 @@ export default class TabBarTop extends React.PureComponent<Props> {
const label = this.props.getLabel({ ...scene, tintColor }); const label = this.props.getLabel({ ...scene, tintColor });
if (typeof label === 'string') { if (typeof label === 'string') {
return ( return (
<SafeAreaView <Animated.Text
forceInset={{ top: tabBarPosition === 'top' ? 'always' : 'never' }} style={[styles.label, { color }, labelStyle]}
allowFontScaling={allowFontScaling}
> >
<Animated.Text {upperCaseLabel ? label.toUpperCase() : label}
style={[styles.label, { color }, labelStyle]} </Animated.Text>
allowFontScaling={allowFontScaling}
>
{upperCaseLabel ? label.toUpperCase() : label}
</Animated.Text>
</SafeAreaView>
); );
} }
if (typeof label === 'function') { if (typeof label === 'function') {