UNPKG

@ozen-ui/kit

Version:

React component library

18 lines (17 loc) 934 B
declare const timingFunctions: { linear: (time: number) => number; 'ease-in': (time: number) => number; 'ease-out': (time: number) => number; 'ease-in-out': (time: number) => number; }; export type TimingFunction = keyof typeof timingFunctions; export interface AnimatePropertyOptions { timingFunction?: TimingFunction; duration?: number; onFinish?: () => void; } /** Анимирует число, вызывая onAnimate при каждом кадре анимации */ export declare const animateNumberValue: (onAnimate: (value: number, previousValue: number) => void, from: number | undefined, to: number, options?: AnimatePropertyOptions) => () => void; /** Анимирует числовое свойство элемента */ export declare const animateProperty: (property: "scrollLeft", element: HTMLElement | null, to: number, options?: AnimatePropertyOptions) => (() => void); export {};