Merge pull request #731 from matrix-org/luke/warn-users-e2e-first-time

Warn users about using e2e for the first time
This commit is contained in:
David Baker 2017-03-02 13:28:15 +00:00 committed by GitHub
commit 0035a91596
2 changed files with 36 additions and 4 deletions

View file

@ -36,6 +36,7 @@ export default React.createClass({
description: "",
button: "OK",
focus: true,
hasCancelButton: true,
};
},
@ -49,6 +50,11 @@ export default React.createClass({
render: function() {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const cancelButton = this.props.hasCancelButton ? (
<button onClick={this.onCancel}>
Cancel
</button>
) : null;
return (
<BaseDialog className="mx_QuestionDialog" onFinished={this.props.onFinished}
onEnterPressed={ this.onOk }
@ -61,10 +67,7 @@ export default React.createClass({
<button className="mx_Dialog_primary" onClick={this.onOk} autoFocus={this.props.focus}>
{this.props.button}
</button>
<button onClick={this.onCancel}>
Cancel
</button>
{cancelButton}
</div>
</BaseDialog>
);