mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Make main menu full width on mobile again.
This commit is contained in:
parent
097000a2b7
commit
70d48d5472
5 changed files with 22 additions and 15 deletions
|
@ -33,9 +33,7 @@ const MainMenu = Object.assign(
|
|||
const device = useDevice();
|
||||
const appState = useExcalidrawAppState();
|
||||
const setAppState = useExcalidrawSetAppState();
|
||||
const onClickOutside = device.isMobile
|
||||
? undefined
|
||||
: () => setAppState({ openMenu: null });
|
||||
const onClickOutside = () => setAppState({ openMenu: null });
|
||||
|
||||
return (
|
||||
<mainMenuTunnel.In>
|
||||
|
@ -50,6 +48,11 @@ const MainMenu = Object.assign(
|
|||
{HamburgerMenuIcon}
|
||||
</DropdownMenu.Trigger>
|
||||
<DropdownMenu.Content
|
||||
collisionBoundary={
|
||||
device.isMobile
|
||||
? document.querySelector(".App-bottom-bar")
|
||||
: undefined
|
||||
}
|
||||
sideOffset={device.isMobile ? 20 : undefined}
|
||||
className="mainmenu-content"
|
||||
onClickOutside={onClickOutside}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue