UNPKG

tav-ui

Version:
13 lines (12 loc) 356 B
export declare type DirectionType = 'scrollTop' | 'scrollLeft'; export interface ScrollToParams { el: any; to: number; duration?: number; direction?: DirectionType; callback?: () => any; } export declare function useScrollTo({ el, to, duration, direction, callback, }: ScrollToParams): { start: () => void; stop: () => void; };