diff --git a/src/core/Flyout.tsx b/src/core/Flyout.tsx index 2a9a84da..4e1021a6 100644 --- a/src/core/Flyout.tsx +++ b/src/core/Flyout.tsx @@ -9,7 +9,6 @@ import { NavigationMenuLink, } from "@radix-ui/react-navigation-menu"; import cn from "./utils/cn"; -import { createPortal } from "react-dom"; /** * Props for the Flyout component. @@ -56,6 +55,7 @@ type FlyoutProps = { * Flag to indicate if animation should be applied. */ hasAnimation: boolean; + setIsOpen: (val: boolean) => void; }; const DEFAULT_MENU_LINK_STYLING = @@ -65,6 +65,17 @@ const DEFAULT_VIEWPORT_STYLING = const PANEL_ANIMATION = "data-[motion=from-end]:animate-enter-from-right data-[motion=from-start]:animate-enter-from-left data-[motion=to-end]:animate-exit-to-right data-[motion=to-start]:animate-exit-to-left"; +export const FlyOverlay = ({ className }: { className: string }) => { + return ( +
+ ); +}; + const Flyout = ({ menuItems, className, @@ -72,34 +83,35 @@ const Flyout = ({ menuLinkClassName, viewPortClassName, hasAnimation, + setIsOpen, }: FlyoutProps) => { return ( -