Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

275
Visualizações
The style of Tab.Navigator doesn't work - REACT

I am learning react-native and I am doing a tabBar to navigate between components but I have a problem.

The style for the shadow doesn't want to work, can anyone help me please ? especially line 27 : "...styles.shadow"

I tried to put it line 29 but it still the same

Thanks you

import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { StyleSheet } from 'react-native';

import colors from '../conf/color'
import Joueurs from '../screens/Joueurs';
import Actus from '../screens/Actus';
import Ionicons from 'react-native-vector-icons/Ionicons';

//Some importations not really important, they can be replaced by anything

const Tab = createBottomTabNavigator();

const Tabs = () => {
    return(
      <Tab.Navigator
        screenOptions={{
        headerShown: false,
        tabBarShowLabel: false,
        tabBarActiveTintColor: colors.white,
        tabBarStyle: { 
          position: 'absolute', 
          bottom: 25, 
          left: 20, 
          right: 20, 
          elevation: 0,
          height: 90,
          borderRadius: 15,
          backgroundColor: colors.grey, 
          ...styles.shadow //There is the problem
          },
          
        }}
      >
          <Tab.Screen name= 'Actus' component={Actus}  />
          <Tab.Screen name='Joueurs' component={Joueurs} />
      </Tab.Navigator>
    )
}

export default Tabs;

const styles = StyleSheet.create({
  shadow: {   //the style I defined
    shadowColor: 'red',
    shadowOfset: {
      width: 46,
      height: 10,
    },
    shadpwOpacity: 0.25,
    shadowRadius: 3.25,
    elevation: 5,
  }
})
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda