mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-06-15 13:24:17 -06:00
added comments to mousehandler helpers
This commit is contained in:
parent
acb4728b1d
commit
2be1d7f6ea
@ -25,10 +25,11 @@ const Header = () => {
|
|||||||
navigate(arg);
|
navigate(arg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//makes the drop down menu visible when the mouse enters the Club Membership & Upcoming events button area
|
||||||
const handleMouseEnter = () => {
|
const handleMouseEnter = () => {
|
||||||
setDropdownVisible(true);
|
setDropdownVisible(true);
|
||||||
};
|
};
|
||||||
|
//makes the drop down menu invisible when the mouse leaves the Club Membership & Upcoming events button area
|
||||||
const handleMouseLeave = () => {
|
const handleMouseLeave = () => {
|
||||||
setDropdownVisible(false);
|
setDropdownVisible(false);
|
||||||
};
|
};
|
||||||
@ -66,7 +67,9 @@ const Header = () => {
|
|||||||
onMouseEnter={handleMouseEnter}
|
onMouseEnter={handleMouseEnter}
|
||||||
onMouseLeave={handleMouseLeave}
|
onMouseLeave={handleMouseLeave}
|
||||||
style={{ background: "red" }}>
|
style={{ background: "red" }}>
|
||||||
<button type="button">Club Membership & Upcoming Events</button>
|
{/* dropdown menu is only visible when a mouse enters the area of the button below */}
|
||||||
|
<button type="button">Club Membership & Upcoming Events</button>{" "}
|
||||||
|
{/*this button does nothing yet*/}
|
||||||
{isDropdownVisible && <DropdownMenu />}
|
{isDropdownVisible && <DropdownMenu />}
|
||||||
</div>
|
</div>
|
||||||
<OpenPageButton
|
<OpenPageButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user