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

141
Vistas
Pseudo Class selector inside Styled-components

I'm kinda blocked on something pretty simple. I try to add a pseudo class selector inside a styled-components. Only to add some background to a link element when hover But it seems that he doesn't recognize the pseudo class since the css inside isn't applicated If anyone can help me figure out why it doesn't it would be life saving haha

Code below

import React from "react";
import styled from "styled-components";

import { Link } from "react-router-dom";
import { config } from "../../configFile";
import { StyledTitle, StyledSpan, StyledBasicLink } from "../../utils/style/Styled";

const Button = styled(Link)`
    display: flex;
    justify-content: center;
    padding: 10px 15px;
    color: #f7f7f7;
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    align-items: center;
    &:hover {
        background-color: darken(#000000, 5%);
        border-radius: 5px;
    }
`
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think that one way to do this would be to add an event handler to your control so that when hover/mouseOver happens it would add a css class to your component to change the background-color and border-radius.

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