Skip to content

Commit

Permalink
Merge pull request #164 from fortanix/feature/gh-79-tooltip-arrow-pos…
Browse files Browse the repository at this point in the history
…ition

Fix tooltip arrow position
  • Loading branch information
mkrause authored Feb 27, 2025
2 parents e6e328d + 34bc306 commit 281378b
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 281378b

Please sign in to comment.