I'm new to using the <Fab />
element and I'm struggling to figure out how to implement a hover effect that will change the button's color. Here's what I have so far:
JavaScript:
<Fab variant="extended" className="sidebar__tweet" fullWidth>
<TwitterIcon className= 'sidebar__twitterIcon2' sx={{ mr: 1 }} />
Tweet
</Fab>
CSS:
.sidebar__tweet {
background-color: var(--twitter-color) !important;
border: none !important;
color: #444444 !important;
font-weight: 900 !important;
text-transform: inherit !important;
border-radius: 30px !important;
height: 50px !important;
margin-top: 20px !important;
}
.sidebar__twitterIcon2 {
color: #444444;
}
Whenever I try to add a new CSS rule for changing the hover color, it overrides the existing styles and reverts back to default. How can I solve this issue?