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:
@@ -19,7 +19,6 @@ import React, { Component } from 'react';
|
||||
import { Button } from '~/ui';
|
||||
import PlaygroundExample from '~/playground/playgroundExample';
|
||||
|
||||
import Modal from '../Modal';
|
||||
import Portal from './portal';
|
||||
|
||||
export default class PortalExample extends Component {
|
||||
@@ -61,14 +60,6 @@ export default class PortalExample extends Component {
|
||||
<div>
|
||||
<button onClick={ this.handleOpen(2) }>Open</button>
|
||||
|
||||
<Modal
|
||||
title='Modal'
|
||||
visible={ open[2] || false }
|
||||
>
|
||||
<button onClick={ this.handleOpen(3) }>Open</button>
|
||||
<button onClick={ this.handleClose }>Close</button>
|
||||
</Modal>
|
||||
|
||||
<Portal
|
||||
isChildModal
|
||||
open={ open[3] || false }
|
||||
|
||||
@@ -71,10 +71,7 @@ export default class Portal extends Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<ReactPortal
|
||||
isOpened
|
||||
onClose={ this.handleClose }
|
||||
>
|
||||
<ReactPortal isOpened>
|
||||
<div
|
||||
className={ styles.backOverlay }
|
||||
onClick={ this.handleClose }
|
||||
@@ -159,6 +156,8 @@ export default class Portal extends Component {
|
||||
if (!hideClose) {
|
||||
onClose();
|
||||
}
|
||||
|
||||
this.stopEvent(event);
|
||||
}
|
||||
|
||||
handleKeyDown = (event) => {
|
||||
|
||||
Reference in New Issue
Block a user