react-bootstrap-typeahead
Version:
React typeahead with Bootstrap styling
21 lines (20 loc) • 786 B
TypeScript
/// <reference types="react" />
import type { Placement } from '@popperjs/core';
import { Align } from '../../types';
export type ReferenceElement = HTMLElement | null;
export interface OverlayOptions {
align?: Align;
dropup?: boolean;
flip?: boolean;
positionFixed?: boolean;
}
export declare function getModifiers(props: Pick<OverlayOptions, 'align' | 'flip'>): {
enabled: boolean;
name: string;
}[];
export declare function getPlacement(props: Pick<OverlayOptions, 'align' | 'dropup'>): Placement;
export declare function useOverlay(referenceElement: ReferenceElement, options: OverlayOptions): {
innerRef: import("react").Dispatch<import("react").SetStateAction<ReferenceElement>>;
style: import("react").CSSProperties;
};
export default useOverlay;