@trail-ui/react
Version:
38 lines (35 loc) • 1.12 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import react__default, { ReactElement } 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 popoverDimensions {
maxHeight?: number;
maxWidth?: number;
height?: number;
width?: number;
}
interface useOverlayProps {
referenceElement: react__default.RefObject<HTMLElement | null>;
children: ReactElement;
position: (typeof Positions)[keyof typeof Positions];
onOverlayClick?: () => void;
offset?: {
x?: number;
y?: number;
};
style?: popoverDimensions;
}
declare function Overlay(props: useOverlayProps): react_jsx_runtime.JSX.Element;
export { Positions, Overlay as default, popoverDimensions };