fix(navbar): lazy motion forwardRef issue (#2527)

This commit is contained in:
աӄա 2024-03-15 20:01:13 +08:00 committed by GitHub
parent 5a8768a4b2
commit 707a61de4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/navbar": patch
---
fixed LazyMotion ForwardRef issue

View File

@ -60,8 +60,8 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => {
) : ( ) : (
<AnimatePresence mode="wait"> <AnimatePresence mode="wait">
{isMenuOpen ? ( {isMenuOpen ? (
<MenuWrapper>
<LazyMotion features={domAnimation}> <LazyMotion features={domAnimation}>
<MenuWrapper>
<m.ul <m.ul
ref={domRef} ref={domRef}
layoutScroll layoutScroll
@ -80,8 +80,8 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => {
> >
{children} {children}
</m.ul> </m.ul>
</LazyMotion>
</MenuWrapper> </MenuWrapper>
</LazyMotion>
) : null} ) : null}
</AnimatePresence> </AnimatePresence>
); );