Skip to content

Commit

Permalink
Merge pull request #2166 from habx/fix/5.54/confirm-menu-position
Browse files Browse the repository at this point in the history
APP-26147: Fix confirm menu position
  • Loading branch information
habx-auto-merge[bot] authored Dec 21, 2021
2 parents 13dace9 + bf2f354 commit c8f95f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/ConfirmMenu/ConfirmMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export const ConfirmMenu = React.forwardRef<HTMLDivElement, ConfirmMenuProps>(
}

const styleSetter = React.useCallback<TogglePanelStyleSetter>(
(_, triggerDimensions) => {
const top = triggerDimensions.bottom + 8

return position === 'right'
? { top, right: triggerDimensions.right }
: { top, left: triggerDimensions.left }
},
(dimensions, triggerDimensions) => ({
left:
position === 'right'
? triggerDimensions.right - dimensions.width
: triggerDimensions.left,
top: triggerDimensions.bottom + 8,
}),
[position]
)

Expand Down

0 comments on commit c8f95f2

Please sign in to comment.