mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore: merged
This commit is contained in:
commit
65345f3d0c
5
.changeset/nice-beds-battle.md
Normal file
5
.changeset/nice-beds-battle.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/navbar": patch
|
||||
---
|
||||
|
||||
fixed NavbarMenu React.Fragment prop error when animation is disabled (#4501)
|
||||
5
.changeset/stale-bears-wink.md
Normal file
5
.changeset/stale-bears-wink.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/theme": patch
|
||||
---
|
||||
|
||||
add missing shadow none (#4586)
|
||||
@ -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";
|
||||
|
||||
@ -130,6 +130,9 @@ const modal = tv({
|
||||
},
|
||||
},
|
||||
shadow: {
|
||||
none: {
|
||||
base: "shadow-none",
|
||||
},
|
||||
sm: {
|
||||
base: "shadow-small",
|
||||
},
|
||||
|
||||
@ -132,6 +132,9 @@ const popover = tv({
|
||||
full: {content: "rounded-full"},
|
||||
},
|
||||
shadow: {
|
||||
none: {
|
||||
content: "shadow-none",
|
||||
},
|
||||
sm: {
|
||||
content: "shadow-small",
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user