From ef013bf64bde5cba0cca4f54d54697229b8d9644 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 2 Sep 2024 09:18:43 -0400 Subject: [PATCH] fix: default avatar icon size Signed-off-by: Adam Setch --- .../RepositoryNotifications.test.tsx.snap | 20 +++++++++---------- src/components/icons/AvatarIcon.tsx | 5 ++++- .../__snapshots__/AvatarIcon.test.tsx.snap | 8 ++++---- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap index 31eacbd20..716b1ccc1 100644 --- a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap +++ b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap @@ -261,10 +261,10 @@ exports[`components/Repository.tsx should toggle account notifications visibilit class="text-gray-500 dark:text-gray-300" fill="currentColor" focusable="false" - height="12" + height="16" style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;" viewBox="0 0 16 16" - width="12" + width="16" > = (props: IAvatarIcon) => { ); } + const defaultIconSize = + props.size === Size.XSMALL ? 16 : props.size === Size.SMALL ? 20 : 24; + return ( ); diff --git a/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap b/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap index b659b6fe0..2fefab8b2 100644 --- a/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap +++ b/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap @@ -10,10 +10,10 @@ exports[`components/icons/AvatarIcon.tsx should render default icon when no url class="text-gray-500 dark:text-gray-300" fill="currentColor" focusable="false" - height="12" + height="16" style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;" viewBox="0 0 16 16" - width="12" + width="16" >