|
@@ -1,13 +1,16 @@
|
|
1
|
+/* @flow */
|
|
2
|
+
|
1
|
3
|
import React, { Component } from 'react';
|
2
|
4
|
|
3
|
5
|
/**
|
4
|
|
- * Abstract (base) class for container of React Component children with a style.
|
|
6
|
+ * Abstract (base) class for container of React {@link Component} children with
|
|
7
|
+ * a style.
|
5
|
8
|
*
|
6
|
9
|
* @extends Component
|
7
|
10
|
*/
|
8
|
11
|
export default class AbstractContainer extends Component {
|
9
|
12
|
/**
|
10
|
|
- * AbstractContainer component's property types.
|
|
13
|
+ * {@code AbstractContainer} component's property types.
|
11
|
14
|
*
|
12
|
15
|
* @static
|
13
|
16
|
*/
|
|
@@ -15,38 +18,43 @@ export default class AbstractContainer extends Component {
|
15
|
18
|
children: React.PropTypes.node,
|
16
|
19
|
|
17
|
20
|
/**
|
18
|
|
- * The event handler/listener to be invoked when this AbstractContainer
|
19
|
|
- * is clicked on Web or pressed on React Native. If onClick is defined
|
20
|
|
- * and touchFeedback is undefined, touchFeedback is considered defined
|
21
|
|
- * as true.
|
|
21
|
+ * The event handler/listener to be invoked when this
|
|
22
|
+ * {@code AbstractContainer} is clicked on Web or pressed on React
|
|
23
|
+ * Native. If {@code onClick} is defined and {@link touchFeedback} is
|
|
24
|
+ * undefined, {@code touchFeedback} is considered defined as
|
|
25
|
+ * {@code true}.
|
22
|
26
|
*/
|
23
|
27
|
onClick: React.PropTypes.func,
|
24
|
28
|
|
25
|
29
|
/**
|
26
|
|
- * The style (as in stylesheet) to be applied to this AbstractContainer.
|
|
30
|
+ * The style (as in stylesheet) to be applied to this
|
|
31
|
+ * {@code AbstractContainer}.
|
27
|
32
|
*/
|
28
|
33
|
style: React.PropTypes.object,
|
29
|
34
|
|
30
|
35
|
/**
|
31
|
|
- * True if this instance is to provide visual feedback when touched;
|
32
|
|
- * otherwise, false. If touchFeedback is undefined and onClick is
|
33
|
|
- * defined, touchFeedback is considered defined as true.
|
|
36
|
+ * If this instance is to provide visual feedback when touched, then
|
|
37
|
+ * {@code true}; otherwise, {@code false}. If {@code touchFeedback} is
|
|
38
|
+ * undefined and {@link onClick} is defined, {@code touchFeedback} is
|
|
39
|
+ * considered defined as {@code true}.
|
34
|
40
|
*/
|
35
|
41
|
touchFeedback: React.PropTypes.bool,
|
36
|
42
|
|
37
|
43
|
/**
|
38
|
|
- * True if this AbstractContainer is to be visible or false if this
|
39
|
|
- * instance is to be hidden or not rendered at all.
|
|
44
|
+ * If this {@code AbstractContainer} is to be visible, then {@code true}
|
|
45
|
+ * or {@code false} if this instance is to be hidden or not rendered at
|
|
46
|
+ * all.
|
40
|
47
|
*/
|
41
|
48
|
visible: React.PropTypes.bool
|
42
|
49
|
};
|
43
|
50
|
|
44
|
51
|
/**
|
45
|
|
- * Renders this AbstractContainer as a React Component of a specific type.
|
|
52
|
+ * Renders this {@code AbstractContainer} as a React {@code Component} of a
|
|
53
|
+ * specific type.
|
46
|
54
|
*
|
47
|
|
- * @param {string|ReactClass} type - The type of the React Component which
|
48
|
|
- * is to be rendered.
|
49
|
|
- * @param {Object|undefined} props - The read-only React Component
|
|
55
|
+ * @param {string|ReactClass} type - The type of the React {@code Component}
|
|
56
|
+ * which is to be rendered.
|
|
57
|
+ * @param {Object|undefined} props - The read-only React {@code Component}
|
50
|
58
|
* properties, if any, to render. If undefined, the props of this instance
|
51
|
59
|
* will be rendered.
|
52
|
60
|
* @protected
|