Add close button to Slash Commands /help dialog

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2019-07-29 22:33:56 +01:00
parent 6d959f826b
commit 90a3fedbef
2 changed files with 4 additions and 1 deletions

View File

@ -837,6 +837,7 @@ export const CommandMap = {
}
</tbody>
</table>,
hasCloseX: true,
});
return success();
},

View File

@ -28,12 +28,14 @@ export default React.createClass({
description: PropTypes.node,
button: PropTypes.string,
onFinished: PropTypes.func,
hasCloseX: PropTypes.bool,
},
getDefaultProps: function() {
return {
title: '',
description: '',
hasCloseX: false,
};
},
@ -48,7 +50,7 @@ export default React.createClass({
<BaseDialog className="mx_InfoDialog" onFinished={this.props.onFinished}
title={this.props.title}
contentId='mx_Dialog_content'
hasCancel={false}
hasCancel={this.props.hasCloseX}
>
<div className="mx_Dialog_content" id="mx_Dialog_content">
{ this.props.description }