Skip to content

Commit

Permalink
fix(mobile-menu): fixes rendering of menu on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Feb 7, 2021
1 parent cc0704a commit c2b1dee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ const ContentsMenu = ({
<div
id="contents-sidebar-left"
className={
(isMobileMenuOpen ? "" : "invisible ") +
"xl:visible z-30 contents-sidebar fixed bg-coolGray-50 min-h-screen border-r border-coolGray-100 border-solid w-full xl:w-320"
!isMobileMenuOpen
? "invisible "
: "visible " +
"xl:visible z-30 contents-sidebar fixed bg-coolGray-50 min-h-screen border-r border-coolGray-100 border-solid w-full xl:w-320"
}
>
<div id="mobile-menu-button" className="absolute inset-0">
<div id="mobile-menu" className="absolute inset-0 cursor-pointer">
<div
className="xl:hidden pointer-cursor my-4 mx-4"
onClick={closeMobileMenu}
Expand Down
6 changes: 5 additions & 1 deletion src/components/docs/sidebars/content-sidebar-left/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ const ContentsSidebarLeft = ({
/>
</div>
<ContentsMenu
closeMobileMenu={closeMobileMenu}
closeMobileMenu={() => {
setIsModuleSelectorMousedOver(false)
closeMobileMenu()
}}
CurrentIconImported={currentIconImported}
isMobileMenuOpen={isMobileMenuOpen}
currentTitle={currentTitle}
currentChapters={currentChapters}
currentPathBeingViewed={currentPathBeingViewed}
Expand Down

1 comment on commit c2b1dee

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.