Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react change button color on hover

  return (
    <div className="App" style={appStyles}>
      <button
        className="primary"
        style={styles}
        onMouseEnter={() => setBgColour("#c83f49")}
        onMouseLeave={() => setBgColour("#fafafa")}
      >
        {" "}
        Red
      </button>
    </div>
  );
Source by www.pluralsight.com #
 
PREVIOUS NEXT
Tagged: #react #change #button #color #hover
ADD COMMENT
Topic
Name
9+4 =