mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Initial attempt @ using radixdropdown for mainmenu
This commit is contained in:
parent
c3e8ddaf58
commit
e094b8b539
5 changed files with 360 additions and 8 deletions
|
@ -15,6 +15,8 @@ import { withInternalFallback } from "../hoc/withInternalFallback";
|
|||
import { composeEventHandlers } from "../../utils";
|
||||
import { useTunnels } from "../context/tunnels";
|
||||
|
||||
import * as DropdownMenuRadix from "@radix-ui/react-dropdown-menu";
|
||||
|
||||
const MainMenu = Object.assign(
|
||||
withInternalFallback(
|
||||
"MainMenu",
|
||||
|
@ -38,7 +40,7 @@ const MainMenu = Object.assign(
|
|||
|
||||
return (
|
||||
<mainMenuTunnel.In>
|
||||
<DropdownMenu open={appState.openMenu === "canvas"}>
|
||||
<DropdownMenuRadix.Root open={appState.openMenu === "canvas"}>
|
||||
<DropdownMenu.Trigger
|
||||
onToggle={() => {
|
||||
setAppState({
|
||||
|
@ -65,7 +67,7 @@ const MainMenu = Object.assign(
|
|||
</fieldset>
|
||||
)}
|
||||
</DropdownMenu.Content>
|
||||
</DropdownMenu>
|
||||
</DropdownMenuRadix.Root>
|
||||
</mainMenuTunnel.In>
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue