chore: merged

This commit is contained in:
Junior Garcia 2025-01-18 10:32:37 -03:00
commit 65345f3d0c
5 changed files with 37 additions and 20 deletions

View File

@ -0,0 +1,5 @@
---
"@heroui/navbar": patch
---
fixed NavbarMenu React.Fragment prop error when animation is disabled (#4501)

View File

@ -0,0 +1,5 @@
---
"@heroui/theme": patch
---
add missing shadow none (#4586)

View File

@ -32,25 +32,28 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => {
const styles = clsx(classNames?.menu, className);
// only apply overlay when menu is open
const OverlayComponent = isMenuOpen ? Overlay : React.Fragment;
if (disableAnimation) {
if (!isMenuOpen) return null;
const contents = disableAnimation ? (
<OverlayComponent portalContainer={portalContainer}>
<ul
ref={domRef}
className={slots.menu?.({class: styles})}
data-open={dataAttr(isMenuOpen)}
style={{
// @ts-expect-error
"--navbar-height": typeof height === "number" ? `${height}px` : height,
}}
{...otherProps}
>
{children}
</ul>
</OverlayComponent>
) : (
return (
<Overlay portalContainer={portalContainer}>
<ul
ref={domRef}
className={slots.menu?.({class: styles})}
data-open={dataAttr(isMenuOpen)}
style={{
// @ts-expect-error
"--navbar-height": typeof height === "number" ? `${height}px` : height,
}}
{...otherProps}
>
{children}
</ul>
</Overlay>
);
}
return (
<AnimatePresence mode="wait">
{isMenuOpen ? (
<Overlay portalContainer={portalContainer}>
@ -78,8 +81,6 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => {
) : null}
</AnimatePresence>
);
return contents;
});
NavbarMenu.displayName = "HeroUI.NavbarMenu";

View File

@ -130,6 +130,9 @@ const modal = tv({
},
},
shadow: {
none: {
base: "shadow-none",
},
sm: {
base: "shadow-small",
},

View File

@ -132,6 +132,9 @@ const popover = tv({
full: {content: "rounded-full"},
},
shadow: {
none: {
content: "shadow-none",
},
sm: {
content: "shadow-small",
},