UNPKG

@trail-ui/react

Version:
35 lines (32 loc) 1.07 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactElement, JSXElementConstructor } from 'react'; declare const Positions: { readonly top: "top"; readonly topLeft: "topLeft"; readonly topRight: "topRight"; readonly bottom: "bottom"; readonly bottomLeft: "bottomLeft"; readonly bottomRight: "bottomRight"; readonly left: "left"; readonly leftTop: "leftTop"; readonly leftBottom: "leftBottom"; readonly right: "right"; readonly rightTop: "rightTop"; readonly rightBottom: "rightBottom"; }; interface useOverlayProps { referenceElement: React.RefObject<HTMLElement | null>; children: ReactElement<unknown, string | JSXElementConstructor<any>>; position: (typeof Positions)[keyof typeof Positions]; onOverlayClick?: () => void; offset?: { x?: number; y?: number; }; style?: { maxHeight?: number; maxWidth?: number; }; } declare function Overlay(props: useOverlayProps): react_jsx_runtime.JSX.Element; export { Positions, Overlay as default };