Линейный градиент на реактивной навигации BottomTabNavigator - PullRequest
0 голосов
/ 31 мая 2018

Я пытаюсь применить линейный градиент к BottomTabNavigator от react-navigation v2.Я попытался выполнить этот ответ , используя createBottomTabNavigator и Expo LinearGradient , но я получаю сообщение об ошибке, показанное ниже:

Error

Вот мой код:

const GradientTab = props => {
    console.log(props);
    return (
        <View style={{ backgroundColor: 'transparent' }}>
            <LinearGradient
                colors={['white', 'rgba(214,234,241,0.77)']}
                style={{
                    position: 'absolute',
                    left: 0,
                    right: 0,
                    top: 0,
                    height: 72
                }}
            >
                <TabBarBottom {...props} />
            </LinearGradient>
        </View >
    )
};

export default AuthorizedNavigator = createBottomTabNavigator({
    routeConfigs, 
    {
        tabBarComponent: GradientTab,
        tabBarPosition: 'bottom',
        tabBarOptions: {
            style: {
                height: 72,
                backgroundColor: 'white'
            }
        },
        initialRouteName: 'Home'
    }
);
...