aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-19 07:57:28 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-19 07:57:28 +0800
commitdb9ff7675404b6d409cc195159a8334c59208c25 (patch)
tree6e04deafe0cdf1957bfedbfd636fd55d779bf6a5
parent49f5495c459f194f3cab6ff24526da924bd64a53 (diff)
downloaddexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar.gz
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar.bz2
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar.lz
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar.xz
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.tar.zst
dexon-sol-tools-db9ff7675404b6d409cc195159a8334c59208c25.zip
Only elevate wallet zIndex when onboarding is in progress
-rw-r--r--packages/website/ts/components/portal/portal.tsx3
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx9
-rw-r--r--packages/website/ts/containers/portal.ts2
3 files changed, 10 insertions, 4 deletions
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index 28a303793..046cb2096 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -33,6 +33,7 @@ import { localStorage } from 'ts/local_storage/local_storage';
import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
import { FullscreenMessage } from 'ts/pages/fullscreen_message';
import { Dispatcher } from 'ts/redux/dispatcher';
+import { zIndex } from 'ts/style/z_index';
import {
BlockchainErrs,
HashData,
@@ -73,6 +74,7 @@ export interface PortalProps {
flashMessage?: string | React.ReactNode;
lastForceTokenStateRefetch: number;
translate: Translate;
+ isPortalOnboardingShowing: boolean;
}
interface PortalState {
@@ -335,6 +337,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
return (
<div>
<Wallet
+ style={this.props.isPortalOnboardingShowing ? { zIndex: zIndex.aboveOverlay } : undefined}
userAddress={this.props.userAddress}
networkId={this.props.networkId}
blockchain={this._blockchain}
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 3a6d9942d..3f24d18c5 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -23,7 +23,6 @@ import { WrapEtherItem } from 'ts/components/wallet/wrap_ether_item';
import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle';
import { Dispatcher } from 'ts/redux/dispatcher';
import { colors } from 'ts/style/colors';
-import { zIndex } from 'ts/style/z_index';
import {
BlockchainErrs,
ProviderType,
@@ -59,6 +58,7 @@ export interface WalletProps {
onAddToken: () => void;
onRemoveToken: () => void;
refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
+ style: React.CSSProperties;
}
interface WalletState {
@@ -79,7 +79,6 @@ interface AccessoryItemConfig {
const styles: Styles = {
root: {
width: '100%',
- zIndex: zIndex.aboveOverlay,
position: 'relative',
},
footerItemInnerDiv: {
@@ -134,6 +133,9 @@ const NO_ALLOWANCE_TOGGLE_SPACE_WIDTH = 56;
const ACCOUNT_PATH = `${WebsitePaths.Portal}/account`;
export class Wallet extends React.Component<WalletProps, WalletState> {
+ public static defaultProps = {
+ style: {},
+ };
constructor(props: WalletProps) {
super(props);
this.state = {
@@ -141,11 +143,10 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
isHoveringSidebar: false,
};
}
-
public render(): React.ReactNode {
const isBlockchainLoaded = this.props.blockchainIsLoaded && this.props.blockchainErr === BlockchainErrs.NoError;
return (
- <Island className="flex flex-column wallet" style={styles.root}>
+ <Island className="flex flex-column wallet" style={{ ...styles.root, ...this.props.style }}>
{isBlockchainLoaded ? this._renderLoadedRows() : this._renderLoadingRows()}
</Island>
);
diff --git a/packages/website/ts/containers/portal.ts b/packages/website/ts/containers/portal.ts
index 5876e65f5..cac2477c6 100644
--- a/packages/website/ts/containers/portal.ts
+++ b/packages/website/ts/containers/portal.ts
@@ -28,6 +28,7 @@ interface ConnectedState {
userSuppliedOrderCache: Order;
flashMessage?: string | React.ReactNode;
translate: Translate;
+ isPortalOnboardingShowing: boolean;
}
interface ConnectedDispatch {
@@ -76,6 +77,7 @@ const mapStateToProps = (state: State, _ownProps: PortalComponentProps): Connect
userSuppliedOrderCache: state.userSuppliedOrderCache,
flashMessage: state.flashMessage,
translate: state.translate,
+ isPortalOnboardingShowing: state.isPortalOnboardingShowing,
};
};