Animated Counter: Adjust speed

This commit is contained in:
Alexander Zinchuk 2023-01-30 15:55:56 +01:00
parent cf01bea655
commit f668805611
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
$perspective: 10px;
$translate: 10px;
$rotate: 30deg;
$animation-time: 0.15s;
$animation-time: 200ms;
.root {
display: inline-flex;

View File

@ -14,7 +14,7 @@ type OwnProps = {
text: string;
};
const ANIMATION_TIME = 150;
const ANIMATION_TIME = 200;
const AnimatedCounter: FC<OwnProps> = ({
text,
@ -54,7 +54,7 @@ const AnimatedCounter: FC<OwnProps> = ({
useTimeout(() => {
isAnimatingRef.current = false;
forceUpdate();
}, shouldAnimate && isAnimatingRef.current ? ANIMATION_TIME : undefined);
}, isAnimatingRef.current ? ANIMATION_TIME : undefined);
return (
<span className={styles.root} dir={lang.isRtl ? 'rtl' : undefined}>