add close menu button to exit menu

This commit is contained in:
Josh Remaley 2023-02-14 16:47:28 -06:00
parent 37a90a90c2
commit 625b734fde
No known key found for this signature in database
GPG Key ID: 1989BFE475E31D28
2 changed files with 19 additions and 0 deletions

View File

@ -218,3 +218,15 @@
.note .reactions-link:hover {
text-decoration: underline;
}
.close-menu {
position: absolute;
width: 100vw;
height: 100vh;
top: -400px;
left: -600px;
}
.close-menu-container {
position: absolute;
}

View File

@ -209,6 +209,13 @@ export default function NoteFooter(props: NoteFooterProps) {
function menuItems() {
return (
<>
<div className="close-menu-container">
{/* This menu item serves as a "close menu" button;
it allows the user to click anywhere nearby the menu to close it. */}
<MenuItem>
<div className="close-menu" />
</MenuItem>
</div>
{prefs.enableReactions && (
<MenuItem onClick={() => setShowReactions(true)}>
<Heart />