Convert all remaining Modals to use Portal (UI consistency) (#4625)

* FirstRun dialog -> Portal

* CreateAccount Modal -> Portal

* CreateWallet dialog -> Portal

* Transfer dialog -> Portal

* Fix failing tests

* ShapeShift dialog -> Portal

* Verification dialog -> Portal

* EditMeta dialog -> Portal

* PasswordManager dialog -> Portal

* WalletSettings dialog -> Portal

* AddAddress dialog -> Portal

* s/delete address/forget address/

* AddContract dialog -> Portal

* DeployContract dialog -> Portal

* ExceuteContract dialog -> Portal

* LoadContract dialog -> Portal

* SaveContract dialog -> Portal

* UpgradeParity dialog -> Portal

* Convert inline modals (tsk, tsk)

* Remove ui/Modal

* Import dialog i18n

* Button array returns (thanks @derhuerst)

* Unneeded debug

* Typo

* Readability formatting
This commit is contained in:
Jaco Greeff
2017-02-22 15:26:58 +01:00
committed by GitHub
parent 49675483c3
commit 6938a7a202
45 changed files with 1009 additions and 666 deletions

View File

@@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react';
import SaveIcon from 'material-ui/svg-icons/content/save';
import ContentClear from 'material-ui/svg-icons/content/clear';
import { Button, Modal, Form, Input } from '~/ui';
import { Button, Form, Input, Portal } from '~/ui';
import Editor from '~/ui/Editor';
import { ERRORS, validateName } from '~/util/validation';
@@ -42,10 +42,11 @@ export default class SaveContract extends Component {
const { name, nameError } = this.state;
return (
<Modal
<Portal
buttons={ this.renderDialogActions() }
onClose={ this.onClose }
open
title='save contract'
actions={ this.renderDialogActions() }
visible
>
<div>
<Form>
@@ -60,11 +61,11 @@ export default class SaveContract extends Component {
<Editor
className={ styles.source }
value={ sourcecode }
maxLines={ 20 }
maxLines={ 25 }
readOnly
/>
</div>
</Modal>
</Portal>
);
}
@@ -72,6 +73,7 @@ export default class SaveContract extends Component {
const cancelBtn = (
<Button
icon={ <ContentClear /> }
key='cancel'
label='Cancel'
onClick={ this.onClose }
/>
@@ -80,6 +82,7 @@ export default class SaveContract extends Component {
const confirmBtn = (
<Button
icon={ <SaveIcon /> }
key='save'
label='Save'
disabled={ !!this.state.nameError }
onClick={ this.onSave }