diff --git a/src/components/Avatar/Avatar.module.css b/src/components/Avatar/Avatar.module.css index d9dbb8bdf..318456891 100644 --- a/src/components/Avatar/Avatar.module.css +++ b/src/components/Avatar/Avatar.module.css @@ -31,49 +31,49 @@ } .avatar--xs { - font: var(--eds-theme-typography-title-xs); + font: var(--eds-theme-typography-tag); height: var(--eds-size-3); width: var(--eds-size-3); } .avatar--sm { - font: var(--eds-theme-typography-title-sm); + font: var(--eds-theme-typography-title-sm-bold); height: var(--eds-size-4); width: var(--eds-size-4); } .avatar--md { - font: var(--eds-theme-typography-title-md); + font: var(--eds-theme-typography-title-md-bold); height: var(--eds-size-5); width: var(--eds-size-5); } .avatar--lg { - font: var(--eds-theme-typography-title-md); + font: var(--eds-theme-typography-title-md-bold); height: var(--eds-size-6); width: var(--eds-size-6); } .avatar--xl { - font: var(--eds-theme-typography-title-lg); + font: var(--eds-theme-typography-headline-md-bold); height: var(--eds-size-8); width: var(--eds-size-8); } .avatar--xxl { - font: var(--eds-theme-typography-title-lg); + font: var(--eds-theme-typography-headline-lg-bold); height: var(--eds-size-12); width: var(--eds-size-12); } .avatar--xxxl { - font: var(--eds-theme-typography-title-lg); + font: var(--eds-theme-typography-headline-lg-bold); height: calc(var(--eds-size-base-unit) * 20); width: calc(var(--eds-size-base-unit) * 20); @@ -83,6 +83,10 @@ border-radius: var(--eds-border-radius-full); } +.avatar--square { + border-radius: var(--eds-border-radius-none); +} + .avatar__image { width: 100%; } diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index df8a3ea11..fa20b8a1c 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -131,7 +131,9 @@ export const Avatar = ({ {...other} > {variant === 'initials' && avatarDisplayName} - {variant === 'icon' && } + {variant === 'icon' && ( + + )} {variant === 'image' && src && ( user )} diff --git a/src/components/Avatar/__snapshots__/Avatar.test.ts.snap b/src/components/Avatar/__snapshots__/Avatar.test.ts.snap index 8caed63a6..5c3253c2b 100644 --- a/src/components/Avatar/__snapshots__/Avatar.test.ts.snap +++ b/src/components/Avatar/__snapshots__/Avatar.test.ts.snap @@ -20,7 +20,10 @@ exports[` ExtraExtraExtraLarge story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > ExtraExtraLarge story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > ExtraLarge story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > ExtraSmall story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > Large story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > Medium story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > Small story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > Square story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" > WithCustomIcon story renders snapshot 1`] = ` aria-hidden="true" class="icon" fill="currentColor" + height="80%" + style="--icon-size: 80%;" viewBox="0 0 24 24" + width="80%" xmlns="http://www.w3.org/2000/svg" >