|
@@ -37,15 +37,15 @@ class PresenceLabel extends Component {
|
37
|
37
|
_presence: PropTypes.string,
|
38
|
38
|
|
39
|
39
|
/**
|
40
|
|
- * Default presence status that will be displayed if user's presence
|
41
|
|
- * status is not available.
|
|
40
|
+ * Class name for the presence label.
|
42
|
41
|
*/
|
43
|
|
- defaultPresence: PropTypes.string,
|
|
42
|
+ className: PropTypes.string,
|
44
|
43
|
|
45
|
44
|
/**
|
46
|
|
- * Styles for the case where there isn't any content to be shown.
|
|
45
|
+ * Default presence status that will be displayed if user's presence
|
|
46
|
+ * status is not available.
|
47
|
47
|
*/
|
48
|
|
- noContentStyles: PropTypes.object,
|
|
48
|
+ defaultPresence: PropTypes.string,
|
49
|
49
|
|
50
|
50
|
/**
|
51
|
51
|
* The ID of the participant whose presence status shoul display.
|
|
@@ -55,7 +55,7 @@ class PresenceLabel extends Component {
|
55
|
55
|
/**
|
56
|
56
|
* Styles for the presence label.
|
57
|
57
|
*/
|
58
|
|
- styles: PropTypes.object,
|
|
58
|
+ style: PropTypes.object,
|
59
|
59
|
|
60
|
60
|
/**
|
61
|
61
|
* Invoked to obtain translated strings.
|
|
@@ -70,14 +70,20 @@ class PresenceLabel extends Component {
|
70
|
70
|
* @returns {ReactElement}
|
71
|
71
|
*/
|
72
|
72
|
render() {
|
73
|
|
- const { _presence, styles, noContentStyles } = this.props;
|
74
|
|
- const combinedStyles = _presence ? styles : noContentStyles;
|
|
73
|
+ const text = this._getPresenceText();
|
|
74
|
+
|
|
75
|
+ if (text === null) {
|
|
76
|
+ return null;
|
|
77
|
+ }
|
|
78
|
+
|
|
79
|
+ const { style, className } = this.props;
|
75
|
80
|
|
76
|
81
|
return (
|
77
|
|
- <Text { ...combinedStyles }>
|
78
|
|
- { this._getPresenceText() }
|
79
|
|
- </Text>
|
80
|
|
- );
|
|
82
|
+ <Text
|
|
83
|
+ className = { className }
|
|
84
|
+ { ...style }>
|
|
85
|
+ { text }
|
|
86
|
+ </Text>);
|
81
|
87
|
}
|
82
|
88
|
|
83
|
89
|
/**
|