stacker.news/components/countdown.js

14 lines
403 B
JavaScript
Raw Normal View History

2021-08-11 20:34:10 +00:00
import Countdown from 'react-countdown'
export default function SimpleCountdown ({ className, onComplete, date }) {
return (
2021-09-23 20:09:07 +00:00
<span className={className}>
2021-08-11 20:34:10 +00:00
<Countdown
date={date}
renderer={props => <span className='text-monospace' suppressHydrationWarning> {props.formatted.minutes}:{props.formatted.seconds}</span>}
2021-08-11 20:34:10 +00:00
onComplete={onComplete}
/>
</span>
)
}