UNPKG

@acrool/react-flip-countdown

Version:
29 lines (28 loc) 764 B
/** * 取得與當前時間的時間差 * @param endTime */ export declare const getTimeDiffFromNow: (endTime: number) => { hours: number; minutes: number; seconds: number; }; /** * 取得前一個數字 * @param currentDigit * @param unit * @param isPause */ export declare const getPreviousDigit: (currentDigit: number, unit: string, isPause: boolean) => number; /** * 取得 digit 數字 * @param isFlip 是否需要翻轉 * @param previousDigit * @param currentDigit */ export declare const getDigit: (isFlip: boolean, previousDigit: string, currentDigit: string) => string; /** * 取得 animation 動畫模式名稱 * @param isFlip 是否需要翻轉 */ export declare const getAnimation: (isFlip: boolean) => "fold" | "unfold";