UNPKG

react-uni-popper

Version:

A universal, headless React popper component powered by Floating UI. Build tooltips, dropdowns, selects, comboboxes, and more — all with one flexible component.

24 lines (20 loc) 1.04 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; type PlacementType = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end'; type ReactUniPopperProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & { portalContainer?: HTMLElement; reference: HTMLElement | null; zIndex?: number; placement?: PlacementType; offset?: number; arrow?: boolean; arrowSize?: number; children: React.ReactNode | ((props: { placement: PlacementType; arrowStyles: React.CSSProperties; floatingStyles: React.CSSProperties; arrowRef: React.RefObject<HTMLDivElement>; }) => React.ReactNode); }; declare function ReactUniPopper({ portalContainer, reference, children, placement, offset, zIndex, arrow, arrowSize, ...props }: ReactUniPopperProps): react_jsx_runtime.JSX.Element; export { ReactUniPopper, ReactUniPopper as default }; export type { PlacementType, ReactUniPopperProps };