React material-ui button no hover

If you use material-ui in React with makeStyles and need to have a button without a hover try this:

Set not classNames={} but classes={root: classes.$YourClassName}

In the $YourClassName definitions set backgroundColor and hoverEffect backgroundColor to be the same:

$YourClassName: {
  backgroundColor: "#676767,
  "&:hover": {
    backgroundColor: "#676767"
  }
}

Let me know if it helped you.

Best,
Frank

Leave a Reply