19 lines
413 B
TypeScript
19 lines
413 B
TypeScript
'use client'
|
|
|
|
import CountUp from 'react-countup'
|
|
import { H2 } from './Texts'
|
|
|
|
interface CountUpNumberProps {
|
|
end: number
|
|
className?: string
|
|
color?: 'light' | 'primary' | 'secondary' | 'custom'
|
|
}
|
|
|
|
export function CountUpNumber({ end, className, color }: CountUpNumberProps) {
|
|
return (
|
|
<H2 color={color} className={className}>
|
|
<CountUp end={end} duration={2.75} separator="," />
|
|
</H2>
|
|
)
|
|
}
|