Skip to content

Commit

Permalink
Fix tooltip arrow position.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Feb 26, 2025
1 parent e6e328d commit 34bc306
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/overlays/Tooltip/TooltipProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ export const TooltipProvider = (props: TooltipProviderProps) => {
switch (placement) {
case 'top':
case 'bottom': {
const x = arrow?.arrowX ?? '50%';
return `calc(${x} + 15px)`;
return arrow?.arrowX ?? '50%';
}
case 'right':
case 'left': {
const y = arrow?.arrowY ?? '50%';
return `calc(${y} + 20px)`;
return arrow?.arrowY ?? '50%';
}
default: return assertUnreachable(placement);
}
Expand Down

0 comments on commit 34bc306

Please sign in to comment.