diff --git a/src/components/common/AnimatedCounter.tsx b/src/components/common/AnimatedCounter.tsx index 7391135e2..4db6044a3 100644 --- a/src/components/common/AnimatedCounter.tsx +++ b/src/components/common/AnimatedCounter.tsx @@ -5,6 +5,7 @@ import React, { import { getGlobal } from '../../global'; import { ANIMATION_LEVEL_MAX } from '../../config'; +import buildClassName from '../../util/buildClassName'; import useLang from '../../hooks/useLang'; import useFlag from '../../hooks/useFlag'; @@ -12,10 +13,12 @@ import styles from './AnimatedCounter.module.scss'; type OwnProps = { text: string; + className?: string; }; const AnimatedCounter: FC = ({ text, + className, }) => { const lang = useLang(); @@ -59,7 +62,7 @@ const AnimatedCounter: FC = ({ }, [text]); return ( - + {textElement} ); diff --git a/src/components/middle/message/ReactionAnimatedEmoji.module.scss b/src/components/middle/message/ReactionAnimatedEmoji.module.scss index 2edacca57..3282b14bb 100644 --- a/src/components/middle/message/ReactionAnimatedEmoji.module.scss +++ b/src/components/middle/message/ReactionAnimatedEmoji.module.scss @@ -8,12 +8,12 @@ width: 1.75rem; height: 1.75rem; - margin-right: 0.125rem; + margin-inline-end: 0.125rem; z-index: 1; &.is-custom-emoji { - margin-right: 0.375rem; + margin-inline-end: 0.375rem; } } diff --git a/src/components/middle/message/ReactionButton.tsx b/src/components/middle/message/ReactionButton.tsx index 35ba0e847..ff76c527e 100644 --- a/src/components/middle/message/ReactionButton.tsx +++ b/src/components/middle/message/ReactionButton.tsx @@ -78,7 +78,7 @@ const ReactionButton: FC<{
{recentReactors.map((user) => )}
- ) : } + ) : } ); }; diff --git a/src/components/middle/message/Reactions.scss b/src/components/middle/message/Reactions.scss index 56680a117..3fd4d0837 100644 --- a/src/components/middle/message/Reactions.scss +++ b/src/components/middle/message/Reactions.scss @@ -33,7 +33,8 @@ display: flex; .Avatar { - margin: 0 0 0 -0.25rem; + margin: 0; + margin-inline-start: -0.25rem; border: 0.0625rem solid var(--reaction-background); width: 1.5rem; height: 1.5rem; @@ -50,16 +51,20 @@ z-index: 1; } + .counter { + margin-inline-end: 0.125rem; + } + &:hover { --reaction-background: var(--hover-color-reaction); } &:first-of-type { - margin-left: 0; + margin-inline-start: 0; } &:last-of-type { - margin-right: 0; + margin-inline-end: 0; } } @@ -72,13 +77,13 @@ .Button { &:first-of-type { - margin-left: 0.125rem; - margin-right: 0; + margin-inline-start: 0.125rem; + margin-inline-end: 0; } &:last-of-type { - margin-right: 0.125rem; - margin-left: 0; + margin-inline-end: 0.125rem; + margin-inline-start: 0; } } } diff --git a/src/components/middle/message/Reactions.tsx b/src/components/middle/message/Reactions.tsx index b3ebe6dc6..ebe1c49d7 100644 --- a/src/components/middle/message/Reactions.tsx +++ b/src/components/middle/message/Reactions.tsx @@ -7,6 +7,7 @@ import type { ObserveFn } from '../../../hooks/useIntersectionObserver'; import { getReactionUniqueKey } from '../../../global/helpers'; import buildClassName from '../../../util/buildClassName'; +import useLang from '../../../hooks/useLang'; import ReactionButton from './ReactionButton'; @@ -37,6 +38,8 @@ const Reactions: FC = ({ observeIntersection, noRecentReactors, }) => { + const lang = useLang(); + const totalCount = useMemo(() => ( message.reactions!.results.reduce((acc, reaction) => acc + reaction.count, 0) ), [message]); @@ -45,6 +48,7 @@ const Reactions: FC = ({
{message.reactions!.results.map((reaction) => (