Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
Styled Components: Hover works on react-icons but not custom svg icons

I am trying to create a hover effect on a svg icon using Styled Components. I get the result I want when using a svg from the react-icons library, however the hover does not work for custom svgs that I link from a local folder:

import React from 'react';
import * as f from './FooterElements';
import * as i from 'react-icons/fa';
import { ReactComponent as IconTwitter } from '../../Images/twitter.svg';

<f.SocialIconLink href='https://www.twitter.com/test/' target='_blank' aria-label='Twitter' >
          <i.FaTwitter/> 
</f.SocialIconLink>
<f.SocialIconLink href='https://www.twitter.com/test/' target='_blank' aria-label='Twitter' >
          <IconTwitter/> 
</f.SocialIconLink>

The hover works on i.FaTwitter but does not on IconTwitter. Any idea why that might happen?

The SocialIconLink component that contains the hover effect :

export const SocialIconLink = styled.a`
    color: #fff;
    font-size: 24px;

    &:hover {
        color: #F59AA6;
        transition: 0.3s ease-out;
    }
`;
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda