diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-25 05:19:19 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-25 05:19:19 +0800 |
commit | b9f5c9383067874d2bb87dcc68808d4563f45363 (patch) | |
tree | 10859582a560b2a3948e355e1d3d15b4f4688daa /packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | |
parent | 0f8e6b395eb2260bbb03da9de35505a7a91c5c7b (diff) | |
download | dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar.gz dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar.bz2 dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar.lz dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar.xz dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.tar.zst dexon-0x-contracts-b9f5c9383067874d2bb87dcc68808d4563f45363.zip |
Fix wrap button alignment issue
Diffstat (limited to 'packages/website/ts/components/onboarding/portal_onboarding_flow.tsx')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index f395674a1..522687758 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -21,7 +21,7 @@ import { WrapEthOnboardingStep2, WrapEthOnboardingStep3, } from 'ts/components/onboarding/wrap_eth_onboarding_step'; -import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle'; +import { AllowanceStateToggle } from 'ts/containers/inputs/allowance_state_toggle'; import { BrowserType, ProviderType, ScreenWidths, Token, TokenByAddress, TokenStateByAddress } from 'ts/types'; import { analytics } from 'ts/utils/analytics'; import { utils } from 'ts/utils/utils'; @@ -149,8 +149,8 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp title: 'Step 3: Unlock Tokens', content: ( <SetAllowancesOnboardingStep - zrxAllowanceToggle={this._renderZrxAllowanceToggle()} - ethAllowanceToggle={this._renderEthAllowanceToggle()} + zrxAllowanceToggle={this._renderZrxAllowanceStateToggle()} + ethAllowanceToggle={this._renderEthAllowanceStateToggle()} doesUserHaveAllowancesForWethAndZrx={this._doesUserHaveAllowancesForWethAndZrx()} /> ), @@ -243,15 +243,15 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp stepIndex: this.props.stepIndex, }); } - private _renderZrxAllowanceToggle(): React.ReactNode { + private _renderZrxAllowanceStateToggle(): React.ReactNode { const zrxToken = utils.getZrxToken(this.props.tokenByAddress); - return this._renderAllowanceToggle(zrxToken); + return this._renderAllowanceStateToggle(zrxToken); } - private _renderEthAllowanceToggle(): React.ReactNode { + private _renderEthAllowanceStateToggle(): React.ReactNode { const ethToken = utils.getEthToken(this.props.tokenByAddress); - return this._renderAllowanceToggle(ethToken); + return this._renderAllowanceStateToggle(ethToken); } - private _renderAllowanceToggle(token: Token): React.ReactNode { + private _renderAllowanceStateToggle(token: Token): React.ReactNode { if (!token) { return null; } @@ -260,10 +260,9 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp return null; } return ( - <AllowanceToggle + <AllowanceStateToggle token={token} tokenState={tokenStateIfExists} - isDisabled={!tokenStateIfExists.isLoaded} blockchain={this.props.blockchain} // tslint:disable-next-line:jsx-no-lambda refetchTokenStateAsync={async () => this.props.refetchTokenStateAsync(token.address)} |