@codecademy/gamut
68.2.268.2.3-alpha.809fdd.0
dist/PopoverContainer/types.d.ts~
dist/PopoverContainer/types.d.tsModified+3−2
Index: package/dist/PopoverContainer/types.d.ts
===================================================================
--- package/dist/PopoverContainer/types.d.ts
+++ package/dist/PopoverContainer/types.d.ts
@@ -1,5 +1,5 @@
-import { RefObject } from 'react';
+import { Ref } from 'react';
import { WithChildrenProp } from '../utils';
export type Alignments = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top' | 'bottom' | 'left' | 'right';
export interface TargetRef extends Pick<HTMLDivElement, 'getBoundingClientRect' | 'contains' | 'offsetHeight' | 'offsetWidth' | 'offsetTop' | 'offsetLeft' | 'offsetParent'> {
}
@@ -53,10 +53,11 @@
*/
onRequestClose?: () => void;
/**
* The target element around which the popover will be positioned.
+ * Only ref objects (e.g. from useRef) are supported at runtime; RefCallback is not.
*/
- targetRef: RefObject<TargetRef>;
+ targetRef: Ref<TargetRef | null>;
/**
* If true, it will allow outside page interaction. Popover container will still close when clicking outside of the popover or hitting the escape key.
*/
allowPageInteraction?: boolean;