@lifi/widget
Version:
LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.
20 lines (19 loc) • 655 B
TypeScript
import { type TimeFromMillisecondsType } from './time.js';
type useTimerSettingsType = {
expiryTimestamp: Date;
onExpire?: () => void;
autoStart?: boolean;
interval?: number;
};
type useTimerResultType = TimeFromMillisecondsType & {
start: () => void;
pause: () => void;
resume: () => void;
restart: (newExpiryTimestamp: Date, newAutoStart?: boolean) => void;
isRunning: boolean;
};
/**
* `useTimer` from https://github.com/amrlabib/react-timer-hook
*/
export declare function useTimer({ expiryTimestamp: expiry, onExpire, autoStart, interval: customInterval, }: useTimerSettingsType): useTimerResultType;
export {};