UNPKG

vue-sticky-directive-ts

Version:

A powerful vue directive make element sticky.

44 lines 1.19 kB
export declare const StickyNamespace = "@@vue-sticky-directive"; export declare enum StickySide { TOP = "top", BOTTOM = "bottom", BOTH = "both" } interface CallbackState { top: boolean; bottom: boolean; sticked: boolean; } declare type CallbackArrow = (state?: CallbackState) => void; export interface StickyOptions { topOffset?: number; bottomOffset?: number; side?: StickySide; zIndex?: number; on?: CallbackArrow; } declare class Sticky { private readonly el; private readonly containerEl; private readonly placeholderEl; private listeners; private isPending; private state; private callbackState; private options; constructor(el: HTMLElement, options?: StickyOptions); private setOptions; private setListeners; doUnbind(): void; updateOptions(options?: StickyOptions): void; private update; private isTopSticky; private isBottomSticky; private recomputeState; private fireEvents; private updateElements; private resetElement; private getContainerEl; } export default Sticky; //# sourceMappingURL=sticky.d.ts.map