react-progress-bar-timer
Version:
Customizable React progress bar with a labeled timer
11 lines (10 loc) • 335 B
TypeScript
export declare type TimerCallbacks = {
/** Callback fired every 1s while timer is running. */
onTick?: () => void;
/** Callback fired when timer finishes. */
onFinish?: () => void;
};
export interface UseTimerProps extends TimerCallbacks {
/** Duration of the timer in seconds. */
duration: number;
}