Skip to content

Commit 566a656

Browse files
committed
feat: Update tooltip component in avatar
1 parent ad6c1ec commit 566a656

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/avatar/internal.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ export default function InternalAvatar({
106106
>
107107
{showTooltip && tooltipText && (
108108
<Tooltip
109-
className={styles.tooltip}
110-
value={tooltipText}
111-
trackRef={handleRef}
112-
// This is added to ensure tooltip is closed when clicked for consistency with other tooltip usages
113-
contentAttributes={{ onPointerDown: () => setShowTooltip(false) }}
109+
className={styles.tooltip}
110+
content={tooltipText}
111+
getTrack={() => handleRef.current}
112+
onEscape={() => setShowTooltip(false)}
114113
/>
115114
)}
116115

0 commit comments

Comments
 (0)