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

106
Visualizações
Tooltip spacing is messed up when placed inside a parent in a view in mui 5

A little context here:

I have created a custom tooltipIconButton component that has a customIconButton component that receives a bunch of props.

const ToolTipIconButton = (props) => {

const {
 placement='top',
 toolTipTitle,
 isDisabled=false,
 ...otherProps
 } = props;

 return (
  <Tooltip
   arrow
   data-testid='testing-stage'
   placement={placement}
   title={isDisabled ? '' : toolTipTitle}
  >

  <span>
    <CustomIconButton
      isDisabled={isDisabled}
      {...otherProps}
    />
  </span>

</Tooltip>
);
};

now I am using this component in a couple of views some of them appear fine, but some of them appear like this i.e without spacing.

enter image description here

I figured it has something to do with the parent component, cause wherever this tooltipIconButton component has a parent let's say a <div><tooltipIconButton/></div> or <Grid><tooltipIconButton/></Grid> , the padding is removed.

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