UNPKG

vuestic-ui

Version:
23 lines (22 loc) 930 B
export declare const TELEPORT_FROM_ATTR = "data-va-teleported-from"; export declare const TELEPORT_ATTR = "data-va-teleported"; export declare const findTeleportedFrom: (el: HTMLElement | undefined | null) => HTMLElement | null; /** * Used in components, which have something to do with Teleport. * You need to add `teleportFromAttrs` to the root element of the component, * and `teleportedAttrs` to the element, which is teleported. * * This way you can find the original element, which was teleported from. * * @notice it is used in `useClickOutside` to track from where teleported originated from. */ export declare const useTeleported: () => { teleportFromAttrs: { "data-va-teleported-from": string; }; teleportedAttrs: { "data-va-app"?: number | undefined; "data-va-teleported": string; }; findTeleportedFrom: (el: HTMLElement | undefined | null) => HTMLElement | null; };