Skip to content

Commit

Permalink
fix(NavigationPopover): Make overlay optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pallendes committed Dec 7, 2023
1 parent dbbddea commit ed325b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/navigation/navigation-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ NavigationPopoverPanel.Item = NavigationPopoverPanelItem;

export interface NavigationPopoverProps {
children: React.ReactNode;
showOverlay?: boolean;
}

const NavigationPopover = ({ children }: NavigationPopoverProps) => {
const NavigationPopover = ({ children, showOverlay }: NavigationPopoverProps) => {
return (
<Popover>
<>
<Popover.Overlay className="absolute inset-0 translate-x-[180px] bg-modal-background" />
{showOverlay && (
<Popover.Overlay className="fixed inset-0 translate-x-[180px] bg-modal-background" />
)}
<div className="relative">{children}</div>
</>
</Popover>
Expand Down

0 comments on commit ed325b1

Please sign in to comment.