From 6da37d1d50c6cb04988b30d1c88d85e4a5355faa Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Thu, 27 Jun 2024 16:46:22 +0400 Subject: [PATCH] [@mantine/core] Tooltip: Fix tooltip arrow being incompatible with headless mode (#6458) --- .../Floating/FloatingArrow/get-arrow-position-styles.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/@mantine/core/src/components/Floating/FloatingArrow/get-arrow-position-styles.ts b/packages/@mantine/core/src/components/Floating/FloatingArrow/get-arrow-position-styles.ts index 130102664ab..096f0a47a5f 100644 --- a/packages/@mantine/core/src/components/Floating/FloatingArrow/get-arrow-position-styles.ts +++ b/packages/@mantine/core/src/components/Floating/FloatingArrow/get-arrow-position-styles.ts @@ -1,4 +1,3 @@ -import { rem } from '../../../core'; import type { ArrowPosition, FloatingPlacement, FloatingPosition, FloatingSide } from '../types'; function horizontalSide( @@ -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 {