@@ -46,24 +46,8 @@ const getOppositePlacement = (placement: Placement): any =>
4646export const getOpacityTransition = ( animationDuration : number ) =>
4747 `opacity ${ animationDuration } ms cubic-bezier(.54, 1.5, .38, 1.11)` ;
4848
49- export interface PopperProps {
50- /**
51- * Trigger reference element to which the popper is relatively placed to.
52- */
53- trigger ?: React . ReactNode ;
54- /**
55- * A reference to the trigger reference element that can be passed instead of or along
56- * with the trigger prop. When passed along with the trigger prop, the div element that
57- * wraps the trigger will be removed.
58- */
59- triggerRef ?: HTMLElement | ( ( ) => HTMLElement ) | React . RefObject < any > ;
60- /** The popper (menu/tooltip/popover) element */
61- popper : React . ReactElement < any > ;
62- /**
63- * Reference to the popper (menu/tooltip/popover) element.
64- * Passing this prop will remove the wrapper div element from the popper.
65- */
66- popperRef ?: HTMLElement | ( ( ) => HTMLElement ) | React . RefObject < any > ;
49+ /** Properties of Popper that can be used to customize its behavior. */
50+ export interface PopperOptions {
6751 /** popper direction */
6852 direction ?: 'up' | 'down' ;
6953 /** popper position */
@@ -80,8 +64,6 @@ export interface PopperProps {
8064 appendTo ?: HTMLElement | ( ( ) => HTMLElement ) | 'inline' ;
8165 /** z-index of the popper element */
8266 zIndex ?: number ;
83- /** True to make the popper visible */
84- isVisible ?: boolean ;
8567 /**
8668 * Map class names to positions, for example:
8769 * {
@@ -176,6 +158,29 @@ export interface PopperProps {
176158 preventOverflow ?: boolean ;
177159}
178160
161+ /** Extends PopperOptions */
162+ export interface PopperProps extends PopperOptions {
163+ /**
164+ * Trigger reference element to which the popper is relatively placed to.
165+ */
166+ trigger ?: React . ReactNode ;
167+ /**
168+ * A reference to the trigger reference element that can be passed instead of or along
169+ * with the trigger prop. When passed along with the trigger prop, the div element that
170+ * wraps the trigger will be removed.
171+ */
172+ triggerRef ?: HTMLElement | ( ( ) => HTMLElement ) | React . RefObject < any > ;
173+ /** The popper (menu/tooltip/popover) element */
174+ popper : React . ReactElement < any > ;
175+ /**
176+ * Reference to the popper (menu/tooltip/popover) element.
177+ * Passing this prop will remove the wrapper div element from the popper.
178+ */
179+ popperRef ?: HTMLElement | ( ( ) => HTMLElement ) | React . RefObject < any > ;
180+ /** True to make the popper visible */
181+ isVisible ?: boolean ;
182+ }
183+
179184export const Popper : React . FunctionComponent < PopperProps > = ( {
180185 trigger,
181186 popper,
0 commit comments