Files
ant-design/components/statistic/Countdown.tsx
lijianan 364bcc74d1 type: export components SemanticName type (#56494)
* types: export components SemanticName type

* update

* update

* update

* update

* update
2026-01-08 09:25:17 +08:00

23 lines
714 B
TypeScript

import * as React from 'react';
import { devUseWarning } from '../_util/warning';
import type { StatisticProps } from './Statistic';
import StatisticTimer from './Timer';
import type { valueType } from './utils';
export interface CountdownProps extends StatisticProps {
format?: string;
onFinish?: () => void;
onChange?: (value?: valueType) => void;
}
const Countdown: React.FC<CountdownProps> = (props) => {
if (process.env.NODE_ENV !== 'production') {
const warning = devUseWarning('Countdown');
warning.deprecated(false, '<Statistic.Countdown />', '<Statistic.Timer type="countdown" />');
}
return <StatisticTimer {...props} type="countdown" />;
};
export default React.memo(Countdown);