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
|
@ -7,6 +7,8 @@ import Stack from "../Stack";
|
|||
import React from "react";
|
||||
import { DropdownMenuContentPropsContext } from "./common";
|
||||
|
||||
import * as DropdownMenuRadix from "@radix-ui/react-dropdown-menu";
|
||||
|
||||
const MenuContent = ({
|
||||
children,
|
||||
onClickOutside,
|
||||
|
@ -34,7 +36,7 @@ const MenuContent = ({
|
|||
|
||||
return (
|
||||
<DropdownMenuContentPropsContext.Provider value={{ onSelect }}>
|
||||
<div
|
||||
<DropdownMenuRadix.Content
|
||||
ref={menuRef}
|
||||
className={classNames}
|
||||
style={style}
|
||||
|
@ -53,7 +55,7 @@ const MenuContent = ({
|
|||
{children}
|
||||
</Island>
|
||||
)}
|
||||
</div>
|
||||
</DropdownMenuRadix.Content>
|
||||
</DropdownMenuContentPropsContext.Provider>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue