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

208
Visualizações
Change CSS style for external library's component in react

I am using an external library in react called "drag and drop files" This library only allows adding children to the component and style them.

My problem is, the library's component style "the parent" has unnecessary style elements, and I'm only able to modify the children and change their style inside the parent element. However, I can't change the element's style itself.

My question is, is there a way to update the parent component style even though there's no direct access to it?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Inspect html elements with your browser. And you can change the styles in your style.css using classes or elements or ids that you inspected.

about 4 years ago · Juan Pablo Isaza Relatório

0

sorry don't have enough rep for a comment but I would think that if you can get the name of the parent element and if you use styledcomponents (https://styled-components.com/)

you could just override the elements styling by creating a styledversion of it.

for example an Avatar from mui would be overridden by

const StyledAvatar = styled(Avatar)`
background-color: black;
color: white;
`;

You'd still need to import the element though.

a normal element (div for example) could be styled by doing the following:

const StyledDiv = styled.div`
background-color: black;
color: white;
`;

hope this kinda helps.

Edit: to use your own styled components, don't forget to export them :)

about 4 years ago · Juan Pablo Isaza Relatório
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