You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Add close button to Slash Commands /help dialog
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -837,6 +837,7 @@ export const CommandMap = {
|
|||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>,
|
</table>,
|
||||||
|
hasCloseX: true,
|
||||||
});
|
});
|
||||||
return success();
|
return success();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,12 +28,14 @@ export default React.createClass({
|
|||||||
description: PropTypes.node,
|
description: PropTypes.node,
|
||||||
button: PropTypes.string,
|
button: PropTypes.string,
|
||||||
onFinished: PropTypes.func,
|
onFinished: PropTypes.func,
|
||||||
|
hasCloseX: PropTypes.bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps: function() {
|
getDefaultProps: function() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
description: '',
|
description: '',
|
||||||
|
hasCloseX: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -48,7 +50,7 @@ export default React.createClass({
|
|||||||
<BaseDialog className="mx_InfoDialog" onFinished={this.props.onFinished}
|
<BaseDialog className="mx_InfoDialog" onFinished={this.props.onFinished}
|
||||||
title={this.props.title}
|
title={this.props.title}
|
||||||
contentId='mx_Dialog_content'
|
contentId='mx_Dialog_content'
|
||||||
hasCancel={false}
|
hasCancel={this.props.hasCloseX}
|
||||||
>
|
>
|
||||||
<div className="mx_Dialog_content" id="mx_Dialog_content">
|
<div className="mx_Dialog_content" id="mx_Dialog_content">
|
||||||
{ this.props.description }
|
{ this.props.description }
|
||||||
|
|||||||
Reference in New Issue
Block a user