diff --git a/web/avatars/avatar.css b/web/avatars/avatar.css --- a/web/avatars/avatar.css +++ b/web/avatars/avatar.css @@ -15,7 +15,7 @@ justify-content: center; } -.emojiMicro { +.emojiXSmall { font-size: 9px; height: 16px; line-height: 16px; @@ -27,19 +27,19 @@ line-height: 24px; } -.emojiLarge { +.emojiMedium { font-size: 28px; height: 42px; line-height: 42px; } -.emojiProfile { +.emojiLarge { font-size: 80px; height: 112px; line-height: 112px; } -.micro { +.xSmall { border-radius: 8px; height: 16px; width: 16px; @@ -53,14 +53,14 @@ min-width: 24px; } -.large { +.medium { border-radius: 21px; height: 42px; width: 42px; min-width: 42px; } -.profile { +.large { border-radius: 56px; height: 112px; width: 112px; diff --git a/web/avatars/avatar.react.js b/web/avatars/avatar.react.js --- a/web/avatars/avatar.react.js +++ b/web/avatars/avatar.react.js @@ -3,14 +3,17 @@ import classnames from 'classnames'; import * as React from 'react'; -import type { ResolvedClientAvatar } from 'lib/types/avatar-types.js'; +import type { + ResolvedClientAvatar, + AvatarSize, +} from 'lib/types/avatar-types.js'; import css from './avatar.css'; import LoadingIndicator from '../loading-indicator.react.js'; type Props = { +avatarInfo: ResolvedClientAvatar, - +size: 'micro' | 'small' | 'large' | 'profile', + +size: AvatarSize, +showSpinner?: boolean, }; @@ -19,18 +22,18 @@ const containerSizeClassName = classnames({ [css.imgContainer]: avatarInfo.type === 'image', - [css.micro]: size === 'micro', - [css.small]: size === 'small', - [css.large]: size === 'large', - [css.profile]: size === 'profile', + [css.xSmall]: size === 'XS', + [css.small]: size === 'S', + [css.medium]: size === 'M', + [css.large]: size === 'L', }); const emojiSizeClassName = classnames({ [css.emojiContainer]: true, - [css.emojiMicro]: size === 'micro', - [css.emojiSmall]: size === 'small', - [css.emojiLarge]: size === 'large', - [css.emojiProfile]: size === 'profile', + [css.emojiXSmall]: size === 'XS', + [css.emojiSmall]: size === 'S', + [css.emojiMedium]: size === 'M', + [css.emojiLarge]: size === 'L', }); const emojiContainerColorStyle = React.useMemo(() => { @@ -66,11 +69,11 @@ ]); let loadingIndicatorSize; - if (size === 'micro') { + if (size === 'XS') { loadingIndicatorSize = 'small'; - } else if (size === 'small') { + } else if (size === 'S') { loadingIndicatorSize = 'small'; - } else if (size === 'large') { + } else if (size === 'M') { loadingIndicatorSize = 'medium'; } else { loadingIndicatorSize = 'large'; diff --git a/web/avatars/edit-thread-avatar.react.js b/web/avatars/edit-thread-avatar.react.js --- a/web/avatars/edit-thread-avatar.react.js +++ b/web/avatars/edit-thread-avatar.react.js @@ -37,7 +37,7 @@