Skip to content

Commit 82c66d1

Browse files
gabrieljablonskiGabriel Jablonski
authored andcommitted
fix: check children when showing tooltip
1 parent 1574e63 commit 82c66d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,14 @@ const Tooltip = ({
291291
}
292292
}, [])
293293

294+
const hasContentOrChildren = Boolean(content || children)
295+
294296
return (
295297
<WrapperElement
296298
id={id}
297299
role="tooltip"
298300
className={classNames(styles['tooltip'], styles[variant], className, {
299-
[styles['show']]: content && !calculatingPosition && (isOpen || show),
301+
[styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
300302
[styles['fixed']]: positionStrategy === 'fixed',
301303
})}
302304
style={{ ...externalStyles, ...inlineStyles }}

0 commit comments

Comments
 (0)