@@ -4,19 +4,14 @@ import ReactDOM from 'react-dom'
4
4
5
5
import {
6
6
AutoControlledComponent as Component ,
7
- keyboardKey ,
8
7
isBrowser ,
8
+ keyboardKey ,
9
9
makeDebugger ,
10
10
META ,
11
11
} from '../../lib'
12
12
13
13
const debug = makeDebugger ( 'portal' )
14
14
15
- const _meta = {
16
- name : 'Portal' ,
17
- type : META . TYPES . ADDON ,
18
- }
19
-
20
15
/**
21
16
* A component that allows you to render children outside their parent.
22
17
* @see Modal
@@ -29,14 +24,6 @@ class Portal extends Component {
29
24
/** Additional classes. */
30
25
className : PropTypes . string ,
31
26
32
- /**
33
- * Controls whether or not the portal should close on a click on the portal background.
34
- * NOTE: This differs from closeOnDocumentClick:
35
- * - DocumentClick - any click not within the portal
36
- * - RootNodeClick - a click not within the portal but within the portal's wrapper
37
- */
38
- closeOnRootNodeClick : PropTypes . bool ,
39
-
40
27
/** Controls whether or not the portal should close when the document is clicked. */
41
28
closeOnDocumentClick : PropTypes . bool ,
42
29
@@ -50,6 +37,14 @@ class Portal extends Component {
50
37
*/
51
38
closeOnPortalMouseLeave : PropTypes . bool ,
52
39
40
+ /**
41
+ * Controls whether or not the portal should close on a click on the portal background.
42
+ * NOTE: This differs from closeOnDocumentClick:
43
+ * - DocumentClick - any click not within the portal
44
+ * - RootNodeClick - a click not within the portal but within the portal's wrapper
45
+ */
46
+ closeOnRootNodeClick : PropTypes . bool ,
47
+
53
48
/** Controls whether or not the portal should close on blur of the trigger. */
54
49
closeOnTriggerBlur : PropTypes . bool ,
55
50
@@ -132,7 +127,10 @@ class Portal extends Component {
132
127
'open' ,
133
128
]
134
129
135
- static _meta = _meta
130
+ static _meta = {
131
+ name : 'Portal' ,
132
+ type : META . TYPES . ADDON ,
133
+ }
136
134
137
135
state = { }
138
136
0 commit comments