UNPKG

@fluentui/react-northstar

Version:
18 lines (17 loc) 737 B
import * as React from 'react'; import { PopperOptions } from './types'; /** * Exposes Popper positioning API via React hook. Contains few important differences between an official "react-popper" * package: * - style attributes are applied directly on DOM to avoid re-renders * - refs changes and resolution is handled properly without re-renders * - contains a specific to React fix related to initial positioning when containers have components with managed focus * to avoid focus jumps * * @param {PopperOptions} options */ export declare function usePopper(options?: PopperOptions): { targetRef: React.MutableRefObject<any>; containerRef: React.MutableRefObject<any>; arrowRef: React.MutableRefObject<any>; };