Is there a way to style my PaymentBtn with the main styled Button but only apply the hover effect when the isLoading prop is activated, without changing anything else? I want the styling to remain the same except for the hover effect.
Basic button
export const BaseBtn = styled.button`
min-width: 165px;
width: auto;
height: 50px;
letter-spacing: 0.5px;
line-height: 50px;
padding: 0 35px 0 35px;
font-size: 15px;
background-color: black;
color: white;
text-transform: uppercase;
font-family: "Open Sans Condensed";
font-weight: bolder;
border: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
&:hover {
background-color: white;
color: black;
border: 1px solid black;
}
`;
PaymentBtn styles
export const PaymentBtn = styled(Button)`
margin-left: auto;
margin-top: 30px;
`;
I am looking for something similar to this but I am not sure how to implement it with styled-components
export const PaymentBtn = styled(Button)`
margin-left: auto;
margin-top: 30px;
&:hover {
${({isLoading}) => isLoading ?
hover:{
background-color: "gray" : "black"
}
}
`;