Previously, my button component was styled like this and it functioned properly:
<Button
component={Link}
to={link}
style={{
background: '#6c74cc',
borderRadius: 3,
border: 0,
color: 'white',
height: 48,
padding: '0 30px',
width: 200,
}}
//className={classes.button}
>
{text}
</Button>
However, I'm now in the process of transitioning from inline styles to using the following approach:
export const useStyles = makeStyles(() =>
createStyles({
button: {
background: '#6c74cc',
borderRadius: 3,
border: 0,
color: 'white',
height: 48,
padding: '0 30px',
width: 200,
},
}),
);
Unfortunately, after making this change, when I hover over my button, it turns transparent or translucent. This is unexpected as the styling remains consistent with the previous version. How can I prevent this unintended behavior?