Skip to content

Commit

Permalink
avatar styling fixed (#2906)
Browse files Browse the repository at this point in the history
Co-authored-by: tomekstepien <tomasz.stepien@elliptic.co>
  • Loading branch information
stepien4soft and tomekstepien authored Apr 25, 2022
1 parent 9cac43b commit 8146339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/memberships/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const MemberInfoAvatar = React.memo(
return (
<Tooltip forBig={forBig} popupContent={<MemberInfo member={member} isOnDark isLead={isLead} />}>
<MemberPhoto small={small} noArea={noArea}>
<MemberPhotoContainer small={fixedSize}>
<MemberPhotoContainer fixedSize={fixedSize}>
<Avatar avatarUri={avatarUri} className={className} />
</MemberPhotoContainer>
</MemberPhoto>
Expand Down
9 changes: 5 additions & 4 deletions packages/ui/src/memberships/components/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ export const MemberId = styled(TextInlineSmall)`
interface MemberPhotoProps {
small?: boolean
noArea?: boolean
fixedSize?: boolean
}

export const MemberPhoto = styled.div<MemberPhotoProps>`
display: flex;
position: relative;
justify-content: center;
align-items: center;
min-width: ${({ small }) => (small ? '24px' : '40px')};
min-height: ${({ small }) => (small ? '24px' : '40px')};
max-width: ${({ small }) => (small ? '24px' : '40px')};
max-height: ${({ small }) => (small ? '24px' : '40px')};
${({ noArea }) =>
!noArea &&
css`
Expand All @@ -83,8 +84,8 @@ export const MemberPhotoContainer = styled.div<MemberPhotoProps>`
display: flex;
justify-content: center;
align-items: center;
max-width: ${({ small }) => (small ? '24px' : '100%')};
max-height: ${({ small }) => (small ? '24px' : '100%')};
width: ${({ fixedSize }) => (fixedSize ? '24px' : '100%')};
height: ${({ fixedSize }) => (fixedSize ? '24px' : '100%')};
border-radius: ${BorderRad.round};
overflow: hidden;
`
Expand Down

1 comment on commit 8146339

@vercel
Copy link

@vercel vercel bot commented on 8146339 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2-git-dev-joystream.vercel.app
pioneer-2.vercel.app
pioneer-2-joystream.vercel.app

Please sign in to comment.