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;
}
`
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.