diff --git a/src/components/structures/ContextualMenu.js b/src/components/structures/ContextualMenu.js index 695b8445ab..c6f8e32b11 100644 --- a/src/components/structures/ContextualMenu.js +++ b/src/components/structures/ContextualMenu.js @@ -17,6 +17,7 @@ limitations under the License. 'use strict'; +var classNames = require('classnames'); var React = require('react'); var ReactDOM = require('react-dom'); @@ -51,25 +52,31 @@ module.exports = { }; var position = { - top: props.top - 20, + top: props.top, }; var chevron = null; if (props.left) { - chevron =
- position.left = props.left + 8; + chevron = + position.left = props.left; } else { chevron = - position.right = props.right + 8; + position.right = props.right; } var className = 'mx_ContextualMenu_wrapper'; + var menuClasses = classNames({ + 'mx_ContextualMenu': true, + 'mx_ContextualMenu_left': props.left, + 'mx_ContextualMenu_right': !props.left, + }); + // FIXME: If a menu uses getDefaultProps it clobbers the onFinished // property set here so you can't close the menu from a button click! var menu = ( -