UNPKG

@winglet/react-utils

Version:

React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality

16 lines (15 loc) 605 B
/** * Returns the PortalContext. * @returns The portal context */ export declare const usePortalContext: () => { portalAnchorRef: import("react").RefObject<HTMLDivElement | null>; register: (element: import("react").ReactNode) => string; unregister: (id: string) => void; }; /** * Returns a ref that should be attached to the DOM element where Portal content will be rendered. * This ref connects the Portal components to their designated anchor point. * @returns The portal anchor ref */ export declare const usePortalAnchorRef: () => import("react").RefObject<HTMLDivElement | null>;