Currently, I am tackling a React JS Project. My task involves creating a breadcrumb that contains both text and an icon. To accomplish this, I have incorporated a material UI icon.
import UpdateIcon from "@material-ui/icons/Update";
import styles from " myfile.module.css "
<div className={styles.headItem}>
<UpdateIcon
className={classes.bread}
/>
<h1
className={styles.bread}
>
Bread Text
</h1>
</div>
Nevertheless, I have encountered an issue: I aspire to define the hover effect for both the icon and text collectively. Unfortunately, due to utilizing a module file for standard HTML elements and makeStyles for Material UI components, I find myself unable to apply the hover effect universally. Despite attempting to set the headItem class, it refuses to take effect.