Skip to content

Commit

Permalink
[@mantine/core] Tooltip: Fix tooltip arrow being incompatible with he…
Browse files Browse the repository at this point in the history
…adless mode (#6458)
  • Loading branch information
rtivital committed Jun 27, 2024
1 parent 5946c59 commit 6da37d1
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { rem } from '../../../core';
import type { ArrowPosition, FloatingPlacement, FloatingPosition, FloatingSide } from '../types';

function horizontalSide(
Expand Down Expand Up @@ -81,14 +80,14 @@ export function getArrowPositionStyles({
}) {
const [side, placement = 'center'] = position.split('-') as [FloatingSide, FloatingPlacement];
const baseStyles = {
width: rem(arrowSize),
height: rem(arrowSize),
width: arrowSize,
height: arrowSize,
transform: 'rotate(45deg)',
position: 'absolute',
[radiusByFloatingSide[side]]: rem(arrowRadius),
[radiusByFloatingSide[side]]: arrowRadius,
};

const arrowPlacement = rem(-arrowSize / 2);
const arrowPlacement = -arrowSize / 2;

if (side === 'left') {
return {
Expand Down

0 comments on commit 6da37d1

Please sign in to comment.