Fix Avatars no centered (#1050)

- fix workspace icon now centered
- fix profile avatar now centered
This commit is contained in:
brendanlaschke 2023-08-02 21:36:00 +02:00 committed by GitHub
parent e06588d8a8
commit 2128d44212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ type StyledLogoProps = {
const StyledLogo = styled.div<StyledLogoProps>` const StyledLogo = styled.div<StyledLogoProps>`
background: url(${(props) => props.logo}); background: url(${(props) => props.logo});
background-position: center;
background-size: cover; background-size: cover;
border-radius: ${({ theme }) => theme.border.radius.xs}; border-radius: ${({ theme }) => theme.border.radius.xs};
height: 16px; height: 16px;

View File

@ -23,6 +23,7 @@ export const StyledAvatar = styled.div<OwnProps & { colorId: string }>`
!isNonEmptyString(avatarUrl) ? stringToHslColor(colorId, 75, 85) : 'none'}; !isNonEmptyString(avatarUrl) ? stringToHslColor(colorId, 75, 85) : 'none'};
${({ avatarUrl }) => ${({ avatarUrl }) =>
isNonEmptyString(avatarUrl) ? `background-image: url(${avatarUrl});` : ''} isNonEmptyString(avatarUrl) ? `background-image: url(${avatarUrl});` : ''}
background-position: center;
background-size: cover; background-size: cover;
border-radius: ${(props) => (props.type === 'rounded' ? '50%' : '2px')}; border-radius: ${(props) => (props.type === 'rounded' ? '50%' : '2px')};
color: ${({ colorId }) => stringToHslColor(colorId, 75, 25)}; color: ${({ colorId }) => stringToHslColor(colorId, 75, 25)};