Skip to content

Commit 8d4e641

Browse files
committed
fix(Avatar): re-enable tooltip
1 parent 7a6508f commit 8d4e641

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/itchy-apples-live.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@digdir/designsystemet-react": patch
3+
---
4+
5+
**Avatar**: fixed an issue where tooltip could not be set

packages/react/src/components/avatar/avatar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(
9797
data-initials={initials}
9898
role={asChild ? undefined : 'img'}
9999
aria-label={ariaLabel || dataTooltip}
100+
data-tooltip={dataTooltip}
100101
tabIndex={dataTooltip ? 0 : undefined} // Tooltips require focusability for accessibility
101102
{...rest}
102103
>

0 commit comments

Comments
 (0)