Skip to content

Commit

Permalink
Merge pull request #269 from piyumaldk/pastel-on-header-avatar
Browse files Browse the repository at this point in the history
Add pastel color as bg to Header's DropDown Avatar where image is not provided
  • Loading branch information
brionmario authored Oct 5, 2024
2 parents b35cb4f + 6110d7b commit a036cc5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ const UserDropdownMenu: FC<UserDropdownMenuProps> & WithWrapperProps = (
onClick={(): void => handleUserProfileNavigation()}
>
<ListItemAvatar>
<Avatar src={user?.image} alt="User">
<Avatar
src={user?.image}
alt="User"
randomBackgroundColor={!user?.image}
backgroundColorRandomizer={user?.name}
>
{user?.name?.split('')[0]}
</Avatar>
</ListItemAvatar>
Expand Down

0 comments on commit a036cc5

Please sign in to comment.