Skip to content

Commit 462f563

Browse files
refactor: class name with interpolated placement
🤦‍♀️
1 parent 8d4e8b0 commit 462f563

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -519,15 +519,18 @@ const Tooltip = ({
519519
<WrapperElement
520520
id={id}
521521
role="tooltip"
522-
className={classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
523-
[styles['show']]: canShow,
524-
[styles['fixed']]: positionStrategy === 'fixed',
525-
[styles['clickable']]: clickable,
526-
'react-tooltip__place-top': actualPlacement === 'top',
527-
'react-tooltip__place-right': actualPlacement === 'right',
528-
'react-tooltip__place-bottom': actualPlacement === 'bottom',
529-
'react-tooltip__place-left': actualPlacement === 'left',
530-
})}
522+
className={classNames(
523+
'react-tooltip',
524+
styles['tooltip'],
525+
styles[variant],
526+
className,
527+
`react-tooltip__place-${actualPlacement}`,
528+
{
529+
[styles['show']]: canShow,
530+
[styles['fixed']]: positionStrategy === 'fixed',
531+
[styles['clickable']]: clickable,
532+
},
533+
)}
531534
style={{ ...externalStyles, ...inlineStyles }}
532535
ref={tooltipRef}
533536
>

0 commit comments

Comments
 (0)