import type { CSSProperties } from 'react' import type { VisualSize, VisualTone } from './types' type FlipNumberProps = { label?: string value: string | number unit?: string className?: string style?: CSSProperties tone?: VisualTone size?: VisualSize } export function FlipNumber({ label, value, unit, className = '', style, tone = 'blue', size = 'md' }: FlipNumberProps) { const chars = String(value).split('') return (
{label ? {label} : null}
{chars.map((char, index) => ( {char} ))} {unit ? {unit} : null}
) }