diff --git a/src/data/constants.js b/src/data/constants.js index 016c27d7..14358108 100644 --- a/src/data/constants.js +++ b/src/data/constants.js @@ -68,6 +68,16 @@ export const RequestStatus = { DENIED: 'denied', }; +/** + * Enum for author label and avatar border color classes. + * @readonly + * @enum {string} + */ +export const AvatarBorderAndLabelColors = { + Staff: 'warning-700', + 'Community TA': 'success-700', +}; + /** * Enum for thread ordering. * @readonly diff --git a/src/discussions/comments/comment/CommentHeader.jsx b/src/discussions/comments/comment/CommentHeader.jsx index 737e2e11..b8932f26 100644 --- a/src/discussions/comments/comment/CommentHeader.jsx +++ b/src/discussions/comments/comment/CommentHeader.jsx @@ -7,7 +7,7 @@ import { injectIntl } from '@edx/frontend-platform/i18n'; import { Avatar, Icon } from '@edx/paragon'; import { CheckCircle, Verified } from '@edx/paragon/icons'; -import { ThreadType } from '../../../data/constants'; +import { AvatarBorderAndLabelColors, ThreadType } from '../../../data/constants'; import { AuthorLabel } from '../../common'; import ActionsDropdown from '../../common/ActionsDropdown'; import { selectAuthorAvatars } from '../../posts/data/selectors'; @@ -19,11 +19,17 @@ function CommentHeader({ actionHandlers, }) { const authorAvatars = useSelector(selectAuthorAvatars(comment.author)); + const colorClass = AvatarBorderAndLabelColors[comment.authorLabel]; return (