@helpwave/hightide
Version:
helpwave's component and theming library
16 lines (13 loc) • 742 B
TypeScript
import { CSSProperties } from 'react';
type PopoverHorizontalAlignment = 'leftOutside' | 'leftInside' | 'rightOutside' | 'rightInside' | 'center';
type PopoverVerticalAlignment = 'topOutside' | 'topInside' | 'bottomOutside' | 'bottomInside' | 'center';
type PopoverPositionOptionsResolved = {
edgePadding: number;
outerGap: number;
verticalAlignment: PopoverVerticalAlignment;
horizontalAlignment: PopoverHorizontalAlignment;
disabled: boolean;
};
type PopoverPositionOptions = Partial<PopoverPositionOptionsResolved>;
declare const usePopoverPosition: (trigger?: DOMRect, options?: PopoverPositionOptions) => CSSProperties;
export { type PopoverHorizontalAlignment, type PopoverVerticalAlignment, usePopoverPosition };