react-all-player
Version:
react-all-player is a simple, lightweight, accessible and customizable React media player that supports modern browsers.
23 lines (22 loc) • 688 B
TypeScript
declare type Position = 'top' | 'bottom' | 'left' | 'right';
declare type Strategy = 'absolute' | 'fixed';
export interface UsePopoverData {
x: number;
y: number;
strategy: Strategy;
}
export interface UsePopoverOptions {
position: Position;
offset: number;
strategy: Strategy;
overflowElement: HTMLElement | string;
}
declare const usePopover: <T extends HTMLElement, K extends HTMLElement>(options?: Partial<UsePopoverOptions>) => {
x: number;
y: number;
strategy: Strategy;
floatingRef: import("react").RefObject<K>;
referenceRef: import("react").RefObject<T>;
update: () => void;
};
export default usePopover;