CountDown

Simple CountDown Component.

Usage:

import CountDown from 'ant-design-pro/lib/CountDown';

Learning more to visit: Using Pro Components Alone

Examples

The simplest usage.

expand codeexpand code
import CountDown from 'ant-design-pro/lib/CountDown';

const targetTime = new Date().getTime() + 3900000;

ReactDOM.render(<CountDown style={{ fontSize: 20 }} target={targetTime} />, mountNode);

API#

Property Description Type Default
format Formatter of time Function(time)
target Target time Date -
onEnd Countdown to the end callback funtion -