diff --git a/src/navigation-bar.tsx b/src/navigation-bar.tsx index 6d95f2177..1866ccf09 100644 --- a/src/navigation-bar.tsx +++ b/src/navigation-bar.tsx @@ -239,7 +239,6 @@ const MainNavigationBarBurgerMenu = ({ closeMenu, open, id, - disableFocusTrap, setDisableFocusTrap, }: { sections: ReadonlyArray; @@ -247,7 +246,6 @@ const MainNavigationBarBurgerMenu = ({ closeMenu: () => void; open: boolean; id: string; - disableFocusTrap: boolean; setDisableFocusTrap: (value: boolean) => void; }) => { const {texts, t} = useTheme(); @@ -353,66 +351,64 @@ const MainNavigationBarBurgerMenu = ({ mountOnEnter unmountOnExit > - - - + {(transitionStatus) => ( +
+ {transitionStatus !== 'entered' && ( +
+ + + + {sections.map( + ({title, menu, ...interactiveProps}, index) => ( + { + setIsSubMenuOpen(true); + setOpenedSection(index); + }, + } + : getInteractivePropsWithCloseMenu( + interactiveProps + ))} + /> + ) + )} + + + {extra && {extra}} + +
+ )} + + {transitionStatus !== 'exited' && openedSection !== -1 && ( +
+ {renderSection(openedSection)} +
+ )} +
+ )} + + ); @@ -867,20 +863,17 @@ export const MainNavigationBar = ({ } return ( - <> - - {mainNavBar} - + + {mainNavBar} setIsBurgerMenuOpen(false)} - disableFocusTrap={disableFocusTrap} + closeMenu={closeMenu} setDisableFocusTrap={setDisableFocusTrap} /> - + ); };