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

142
Visualizações
React native styled components cannot override component's style

I have a weird problem with stlyed components. I have a component Header with a basic style but when a try to use this component and extend the style nothing happens. Can someone tell me what going on?

import styled from 'styled-components/native';
export const Container = styled.SafeAreaView``;

export const Content = styled.View`
  height: 72px;
  padding: 0 24px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
`;

Header component

import React, { PropsWithChildren, FC } from 'react';
import { Container, Content } from './styles';

const Header: FC = ({ children }: PropsWithChildren<unknown>, props) => {
  return (
    <Container {...props}>
      <Content>{children}</Content>
    </Container>
  );
};

export default Header;

import styled from 'styled-components/native';

import Header from '../components/Header/index';

export const Container = styled(Header)`
  background: blue;
  height: 200px;
`;

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