|
@@ -0,0 +1,48 @@
|
|
1
|
+// @flow
|
|
2
|
+
|
|
3
|
+import type { Dispatch } from 'redux';
|
|
4
|
+
|
|
5
|
+import { translate } from '../../../base/i18n';
|
|
6
|
+import { IconParticipants } from '../../../base/icons';
|
|
7
|
+import { connect } from '../../../base/redux';
|
|
8
|
+import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
|
9
|
+
|
|
10
|
+type Props = AbstractButtonProps & {
|
|
11
|
+
|
|
12
|
+ /**
|
|
13
|
+ * The redux {@code dispatch} function.
|
|
14
|
+ */
|
|
15
|
+ dispatch: Dispatch<any>
|
|
16
|
+};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+/**
|
|
20
|
+ * Implements an {@link AbstractButton} to open the participants panel.
|
|
21
|
+ */
|
|
22
|
+class ParticipantsPanelButton extends AbstractButton<Props, *> {
|
|
23
|
+ accessibilityLabel = 'toolbar.accessibilityLabel.participants';
|
|
24
|
+ icon = IconParticipants;
|
|
25
|
+ label = 'toolbar.participants';
|
|
26
|
+
|
|
27
|
+ /**
|
|
28
|
+ * Handles clicking / pressing the button, and opens the participants panel.
|
|
29
|
+ *
|
|
30
|
+ * @private
|
|
31
|
+ * @returns {void}
|
|
32
|
+ */
|
|
33
|
+}
|
|
34
|
+
|
|
35
|
+/**
|
|
36
|
+ * Maps part of the redux state to the component's props.
|
|
37
|
+ *
|
|
38
|
+ * @param {Object} state - The redux store/state.
|
|
39
|
+ * @returns {Props}
|
|
40
|
+ */
|
|
41
|
+function mapStateToProps(state: Object) {
|
|
42
|
+
|
|
43
|
+ return {
|
|
44
|
+ state
|
|
45
|
+ };
|
|
46
|
+}
|
|
47
|
+
|
|
48
|
+export default translate(connect(mapStateToProps)(ParticipantsPanelButton));
|