diff --git a/browser/src/dashboard/Spring.tsx b/browser/src/dashboard/Spring.tsx index 5533dd07..acb9fe32 100644 --- a/browser/src/dashboard/Spring.tsx +++ b/browser/src/dashboard/Spring.tsx @@ -1,6 +1,6 @@ import React from 'react' -import { useSpring, animated, useTransition } from 'react-spring' +import { useSpring, animated, useTransition, config } from 'react-spring' // this top level method has to be any type right now as of // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20356 @@ -24,9 +24,12 @@ interface ValueSpringProps { formatter: Intl.NumberFormat } +// Use configuration preset 'slow' to slow down the £value animations +// https://react-spring.dev/docs/advanced/config#presets export const ValueSpring = (props: ValueSpringProps) => { const springProps = useSpring({ - value: props.value + value: props.value, + config: config.slow }) return (