Skip to content

Commit

Permalink
chore(menu): do not increase height for MenuItemButton
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Sep 7, 2024
1 parent 9116e2e commit 340e3d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/menu/MenuItemButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const MenuItemButton = forwardRef<HTMLLIElement, MenuItemButtonProps>(
const {
id: propId,
children,
height: propHeight,
onClick = noop,
onKeyDown = noop,
onMouseEnter = noop,
Expand Down Expand Up @@ -82,9 +83,14 @@ export const MenuItemButton = forwardRef<HTMLLIElement, MenuItemButtonProps>(
setVisible(id === activeId);
}, [activeId, defaultFocusIndex, id, menubar, setVisible]);

const dropdownIcon = getIcon(root ? "dropdown" : "forward");
let height = propHeight;
let rightAddon = propRightAddon;
const dropdownIcon = getIcon(root ? "dropdown" : "forward");
if (!disableDropdownIcon) {
if (!height && !props.leftAddon) {
height = "normal";
}

rightAddon = (
<IconRotator {...iconRotatorProps} rotated={visible}>
{dropdownIcon}
Expand Down

0 comments on commit 340e3d2

Please sign in to comment.