import { cx } from "@twind/core"; import React from "react"; function CounterDigit(props: { value: number; transitionDurationMs?: number }) { const { value, transitionDurationMs = 1000 } = props; const rads = -(Math.floor(value) % 1_000_000) * 2 * Math.PI * 0.1; return ( {Array.from({ length: 10 }).map((_, i) => ( {i} ))} ); } export function Counter(props: { value: number; digits: number; transitionDurationMs?: number; className?: string; }) { const { value, digits, transitionDurationMs, className } = props; return ( {Array.from({ length: digits }) .flatMap((_, i) => [ i > 0 && i % 3 === 0 ? ( ) : null, , ]) .reverse()} ); }