Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,17 @@ class BaseVideoChatButtonAndMenu extends Component {
top: this.state.videoChatIconPosition.y + 40,
}}
>
{_.map(this.menuItemData, ({icon, text, onPress}) => (
<MenuItem
wrapperStyle={styles.mr3}
key={text}
icon={icon}
title={text}
onPress={onPress}
/>
))}
<View style={this.props.isSmallScreenWidth ? {} : styles.pv3}>
{_.map(this.menuItemData, ({icon, text, onPress}) => (
<MenuItem
wrapperStyle={styles.mr3}
key={text}
icon={icon}
title={text}
onPress={onPress}
/>
))}
</View>
</Popover>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultProps = {
class BaseReportActionContextMenu extends React.Component {
constructor(props) {
super(props);
this.wrapperStyle = getReportActionContextMenuStyles(this.props.isMini);
this.wrapperStyle = getReportActionContextMenuStyles(this.props.isMini, this.props.isSmallScreenWidth);

this.state = {
shouldKeepOpen: false,
Expand Down
14 changes: 12 additions & 2 deletions src/styles/getReportActionContextMenuStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@ const bigWrapperStyle = [
* Generate the wrapper styles for the ReportActionContextMenu.
*
* @param {Boolean} isMini
* @param {Boolean} isSmallScreenWidth
* @returns {Array}
*/
function getReportActionContextMenuStyles(isMini) {
return isMini ? miniWrapperStyle : bigWrapperStyle;
function getReportActionContextMenuStyles(isMini, isSmallScreenWidth) {
if (isMini) {
return miniWrapperStyle;
}

return [
...bigWrapperStyle,

// Small screens use a bottom-docked modal that already has vertical padding.
isSmallScreenWidth ? {} : styles.pv3,
];
}

export default getReportActionContextMenuStyles;