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