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

140
Visualizações
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 Respostas
Responde à pergunta

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 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