@@ -46,24 +46,8 @@ const getOppositePlacement = (placement: Placement): any =>
46
46
export const getOpacityTransition = ( animationDuration : number ) =>
47
47
`opacity ${ animationDuration } ms cubic-bezier(.54, 1.5, .38, 1.11)` ;
48
48
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 {
67
51
/** popper direction */
68
52
direction ?: 'up' | 'down' ;
69
53
/** popper position */
@@ -80,8 +64,6 @@ export interface PopperProps {
80
64
appendTo ?: HTMLElement | ( ( ) => HTMLElement ) | 'inline' ;
81
65
/** z-index of the popper element */
82
66
zIndex ?: number ;
83
- /** True to make the popper visible */
84
- isVisible ?: boolean ;
85
67
/**
86
68
* Map class names to positions, for example:
87
69
* {
@@ -176,6 +158,29 @@ export interface PopperProps {
176
158
preventOverflow ?: boolean ;
177
159
}
178
160
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
+
179
184
export const Popper : React . FunctionComponent < PopperProps > = ( {
180
185
trigger,
181
186
popper,
0 commit comments