UNPKG

tdesign-react

Version:
17 lines (16 loc) 666 B
import { createPopper as defaultCreatePopper, type Instance as PopperInstance, type Options as PopperOptions, type VirtualElement } from '@popperjs/core'; import type { Styles } from '../common'; type Options = Partial<PopperOptions & { createPopper: typeof defaultCreatePopper; }>; type Attributes = { [key: string]: { [key: string]: string; }; }; export interface InnerPopperInstance extends PopperInstance { attributes: Attributes; styles: Record<string, Styles>; } declare const usePopper: (referenceElement?: Element | VirtualElement, popperElement?: HTMLElement, options?: Options) => InnerPopperInstance; export default usePopper;