|
@@ -2,6 +2,7 @@
|
2
|
2
|
|
3
|
3
|
/* eslint-disable react/jsx-no-bind */
|
4
|
4
|
|
|
5
|
+import { withStyles } from '@material-ui/styles';
|
5
|
6
|
import React, { Component } from 'react';
|
6
|
7
|
import { bindActionCreators } from 'redux';
|
7
|
8
|
|
|
@@ -17,7 +18,7 @@ import { connect } from '../../../base/redux';
|
17
|
18
|
import { dockToolbox } from '../../../toolbox/actions.web';
|
18
|
19
|
import { addReactionToBuffer } from '../../actions.any';
|
19
|
20
|
import { toggleReactionsMenuVisibility } from '../../actions.web';
|
20
|
|
-import { REACTIONS } from '../../constants';
|
|
21
|
+import { REACTIONS, REACTIONS_MENU_HEIGHT } from '../../constants';
|
21
|
22
|
|
22
|
23
|
import ReactionButton from './ReactionButton';
|
23
|
24
|
|
|
@@ -43,6 +44,11 @@ type Props = {
|
43
|
44
|
*/
|
44
|
45
|
_raisedHand: boolean,
|
45
|
46
|
|
|
47
|
+ /**
|
|
48
|
+ * An object containing the CSS classes.
|
|
49
|
+ */
|
|
50
|
+ classes: Object,
|
|
51
|
+
|
46
|
52
|
/**
|
47
|
53
|
* The Redux Dispatch function.
|
48
|
54
|
*/
|
|
@@ -61,6 +67,21 @@ type Props = {
|
61
|
67
|
|
62
|
68
|
declare var APP: Object;
|
63
|
69
|
|
|
70
|
+const styles = theme => {
|
|
71
|
+ return {
|
|
72
|
+ overflow: {
|
|
73
|
+ width: 'auto',
|
|
74
|
+ paddingBottom: 'max(env(safe-area-inset-bottom, 0), 16px)',
|
|
75
|
+ backgroundColor: theme.palette.ui01,
|
|
76
|
+ boxShadow: 'none',
|
|
77
|
+ borderRadius: 0,
|
|
78
|
+ position: 'relative',
|
|
79
|
+ boxSizing: 'border-box',
|
|
80
|
+ height: `${REACTIONS_MENU_HEIGHT}px`
|
|
81
|
+ }
|
|
82
|
+ };
|
|
83
|
+};
|
|
84
|
+
|
64
|
85
|
/**
|
65
|
86
|
* Implements the reactions menu.
|
66
|
87
|
*
|
|
@@ -172,10 +193,10 @@ class ReactionsMenu extends Component<Props> {
|
172
|
193
|
* @inheritdoc
|
173
|
194
|
*/
|
174
|
195
|
render() {
|
175
|
|
- const { _raisedHand, t, overflowMenu, _isMobile } = this.props;
|
|
196
|
+ const { _raisedHand, t, overflowMenu, _isMobile, classes } = this.props;
|
176
|
197
|
|
177
|
198
|
return (
|
178
|
|
- <div className = { `reactions-menu ${overflowMenu ? 'overflow' : ''}` }>
|
|
199
|
+ <div className = { `reactions-menu ${overflowMenu ? `overflow ${classes.overflow}` : ''}` }>
|
179
|
200
|
<div className = 'reactions-row'>
|
180
|
201
|
{ this._getReactionButtons() }
|
181
|
202
|
</div>
|
|
@@ -233,4 +254,4 @@ function mapDispatchToProps(dispatch) {
|
233
|
254
|
export default translate(connect(
|
234
|
255
|
mapStateToProps,
|
235
|
256
|
mapDispatchToProps
|
236
|
|
-)(ReactionsMenu));
|
|
257
|
+)(withStyles(styles)(ReactionsMenu)));
|