Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
07e65fbd7f
2 changed files with 21 additions and 0 deletions
|
@ -30,11 +30,21 @@ module.exports = {
|
||||||
ContextualMenuContainerId: "mx_ContextualMenu_Container",
|
ContextualMenuContainerId: "mx_ContextualMenu_Container",
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
top: PropTypes.number,
|
||||||
|
bottom: PropTypes.number,
|
||||||
|
left: PropTypes.number,
|
||||||
|
right: PropTypes.number,
|
||||||
menuWidth: PropTypes.number,
|
menuWidth: PropTypes.number,
|
||||||
menuHeight: PropTypes.number,
|
menuHeight: PropTypes.number,
|
||||||
chevronOffset: PropTypes.number,
|
chevronOffset: PropTypes.number,
|
||||||
menuColour: PropTypes.string,
|
menuColour: PropTypes.string,
|
||||||
chevronFace: PropTypes.string, // top, bottom, left, right
|
chevronFace: PropTypes.string, // top, bottom, left, right
|
||||||
|
// Function to be called on menu close
|
||||||
|
onFinished: PropTypes.func,
|
||||||
|
menuPaddingTop: PropTypes.number,
|
||||||
|
menuPaddingRight: PropTypes.number,
|
||||||
|
menuPaddingBottom: PropTypes.number,
|
||||||
|
menuPaddingLeft: PropTypes.number,
|
||||||
},
|
},
|
||||||
|
|
||||||
getOrCreateContainer: function() {
|
getOrCreateContainer: function() {
|
||||||
|
@ -138,6 +148,15 @@ module.exports = {
|
||||||
if (!isNaN(Number(props.menuPaddingTop))) {
|
if (!isNaN(Number(props.menuPaddingTop))) {
|
||||||
menuStyle["paddingTop"] = props.menuPaddingTop;
|
menuStyle["paddingTop"] = props.menuPaddingTop;
|
||||||
}
|
}
|
||||||
|
if (!isNaN(Number(props.menuPaddingLeft))) {
|
||||||
|
menuStyle["paddingLeft"] = props.menuPaddingLeft;
|
||||||
|
}
|
||||||
|
if (!isNaN(Number(props.menuPaddingBottom))) {
|
||||||
|
menuStyle["paddingBottom"] = props.menuPaddingBottom;
|
||||||
|
}
|
||||||
|
if (!isNaN(Number(props.menuPaddingRight))) {
|
||||||
|
menuStyle["paddingRight"] = props.menuPaddingRight;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: If a menu uses getDefaultProps it clobbers the onFinished
|
// FIXME: If a menu uses getDefaultProps it clobbers the onFinished
|
||||||
// property set here so you can't close the menu from a button click!
|
// property set here so you can't close the menu from a button click!
|
||||||
|
|
|
@ -217,6 +217,8 @@ export default class Stickerpicker extends React.Component {
|
||||||
element: this._getStickerpickerContent(),
|
element: this._getStickerpickerContent(),
|
||||||
onFinished: this._onFinished,
|
onFinished: this._onFinished,
|
||||||
menuPaddingTop: 0,
|
menuPaddingTop: 0,
|
||||||
|
menuPaddingLeft: 0,
|
||||||
|
menuPaddingRight: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue