From bc902a9741c4d72e3bf9c8c7079f5564fefab5a3 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Thu, 28 Jul 2016 14:32:59 +0100 Subject: [PATCH] Tidy up of the contextual menu refactor --- src/components/structures/ContextualMenu.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/structures/ContextualMenu.js b/src/components/structures/ContextualMenu.js index bf63227283..114bdaad1b 100644 --- a/src/components/structures/ContextualMenu.js +++ b/src/components/structures/ContextualMenu.js @@ -28,6 +28,12 @@ var ReactDOM = require('react-dom'); module.exports = { ContextualMenuContainerId: "mx_ContextualMenu_Container", + propTypes: { + menuWidth: React.PropTypes.number, + menuHeight: React.PropTypes.number, + chevronOffset: React.PropTypes.number, + }, + getOrCreateContainer: function() { var container = document.getElementById(this.ContextualMenuContainerId); @@ -55,12 +61,16 @@ module.exports = { top: props.top, }; + var chevronOffset = { + top: props.cheveronOffset, + } + var chevron = null; if (props.left) { - chevron =
+ chevron =
position.left = props.left; } else { - chevron =
+ chevron =
position.right = props.right; }