UNPKG

916 BTypeScriptView Raw
1import * as React from 'react';
2import { StatisticProps } from './Statistic';
3import { countdownValueType, FormatConfig } from './utils';
4interface CountdownProps extends StatisticProps {
5 value?: countdownValueType;
6 format?: string;
7 onFinish?: () => void;
8 onChange?: (value?: countdownValueType) => void;
9}
10declare class Countdown extends React.Component<CountdownProps, {}> {
11 static defaultProps: Partial<CountdownProps>;
12 countdownId?: number;
13 componentDidMount(): void;
14 componentDidUpdate(): void;
15 componentWillUnmount(): void;
16 syncTimer: () => void;
17 startTimer: () => void;
18 stopTimer: () => void;
19 formatCountdown: (value: countdownValueType, config: FormatConfig) => string;
20 valueRender: (node: React.ReactElement<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
21 render(): JSX.Element;
22}
23export default Countdown;