@element-plus/nightly
Version:
A Component Library for Vue 3
16 lines (15 loc) • 507 B
TypeScript
import type { InjectionKey, Ref } from 'vue';
import type { UseNamespaceReturn } from '@element-plus/nightly/es/hooks';
export interface AnchorLinkState {
el: HTMLElement;
href: string;
}
export interface AnchorContext {
ns: UseNamespaceReturn;
direction: string;
currentAnchor: Ref<string>;
addLink(state: AnchorLinkState): void;
removeLink(href: string): void;
handleClick(e: MouseEvent, href?: string): void;
}
export declare const anchorKey: InjectionKey<AnchorContext>;