Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!