Animated Counter: Adjust speed
This commit is contained in:
parent
cf01bea655
commit
f668805611
@ -1,7 +1,7 @@
|
||||
$perspective: 10px;
|
||||
$translate: 10px;
|
||||
$rotate: 30deg;
|
||||
$animation-time: 0.15s;
|
||||
$animation-time: 200ms;
|
||||
|
||||
.root {
|
||||
display: inline-flex;
|
||||
|
||||
@ -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}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user