Skip to content

Commit

Permalink
fix(avatar): use label font
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Nov 28, 2023
1 parent 782eb8b commit 5f9da76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/primitives/avatar/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const Avatar = forwardRef(function Avatar(
}
}, [onImageLoadError])

const initialsSize = useMemo(() => size.map((s) => (s === 0 ? 0 : s + 1)), [size])
const initialsSize = useMemo(() => size.map((s) => (s === 0 ? 0 : s * 2)), [size])

return (
<Root
Expand Down Expand Up @@ -175,7 +175,7 @@ export const Avatar = forwardRef(function Avatar(
{(imageFailed || !src) && initials && (
<>
<Initials>
<InitialsLabel as="span" size={initialsSize}>
<InitialsLabel forwardedAs="span" size={initialsSize}>
{initials}
</InitialsLabel>
</Initials>
Expand Down

0 comments on commit 5f9da76

Please sign in to comment.