Skip to content

Commit

Permalink
Update submenu shift
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Nov 23, 2023
1 parent 5e02c8c commit c0f12c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/components/src/dropdown-menu-v2-ariakit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,12 @@ const UnconnectedDropdownMenu = (
{ ...otherProps }
modal={ modal }
store={ dropdownMenuStore }
// Nested menus overlap by 8px
// Root menu has an 8px distance from its trigger,
// otherwise 0 (which causes the submenu to slightly overlap)
gutter={ gutter ?? ( dropdownMenuStore.parent ? 0 : 8 ) }
// Nested menus have their items aligned horizontally
shift={ shift ?? ( dropdownMenuStore.parent ? -8 : 0 ) }
// Align nested menu by the same (but opposite) amount
// as the menu container's padding.
shift={ shift ?? ( dropdownMenuStore.parent ? -4 : 0 ) }
hideOnHoverOutside={ false }
data-side={ appliedPlacementSide }
variant={ variant }
Expand Down

0 comments on commit c0f12c3

Please sign in to comment.