scroll-into-view-rtl-support
Version:
ScrollIntoView with duration speed support
13 lines (12 loc) • 620 B
TypeScript
import { CustomBehaviorOptions, Options, StandardBehaviorOptions } from './scroll-into-view-if-needed';
export type CustomEasing = (t: number) => number;
export type SmoothBehaviorOptions = Options & {
behavior?: 'smooth';
duration?: number;
ease?: CustomEasing;
};
declare function scroll(target: Element, options?: SmoothBehaviorOptions): Promise<any>;
declare function scroll<T>(target: Element, options: CustomBehaviorOptions<T>): T;
declare function scroll(target: Element, options: StandardBehaviorOptions): void;
declare const smoothScrollIntoView: typeof scroll;
export default smoothScrollIntoView;