NFT-Preview-Card-Component

Solution retrospective
Hi, friends! Hope for your feedback❤️
What did you find difficult while building the project? I tackled a problem with hover effect. I was not sure about best way of solving it. Could anybody answer is that okey to get hover effect just by changing background-image on hover. Is there any better solution?
const CardImage = styled.div`
width: 278px;
height: 278px;
margin: 0 25px;
border-radius: 8px;
background-image: url(${EquilibriumImg});
background-size: cover;
@media (min-width: 390px) {
width: 302px;
height: 302px;
}
&:hover {
background-image: url(${EquilibriumHoverImg});
}
`;
Which areas of your code are you unsure of?
I used a styled-components for a first time. So can anybody check it please here?
Do you have any questions about best practices?
What's the best practice of using styled-components?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Victor Fedorov's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord