Finish set allowance step

This commit is contained in:
fragosti
2018-06-15 18:15:03 -07:00
parent 8893bc102c
commit 433f830cf3
2 changed files with 32 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import { AddEthOnboardingStep } from 'ts/components/onboarding/add_eth_onboardin
import { InstallWalletOnboardingStep } from 'ts/components/onboarding/install_wallet_onboarding_step';
import { IntroOnboardingStep } from 'ts/components/onboarding/intro_onboarding_step';
import { OnboardingFlow, Step } from 'ts/components/onboarding/onboarding_flow';
import { SetAllowancesOnboardingStep } from 'ts/components/onboarding/set_allowances_onboarding_step';
import { UnlockWalletOnboardingStep } from 'ts/components/onboarding/unlock_wallet_onboarding_step';
import { WrapEthOnboardingStep } from 'ts/components/onboarding/wrap_eth_onboarding_step';
import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle';
@@ -98,11 +99,10 @@ export class PortalOnboardingFlow extends React.Component<PortalOnboardingFlowPr
target: '.weth-row',
title: 'Step 2/2',
content: (
<div>
Unlock your tokens for trading. You only need to do this once for each token.
<div> ETH: {this._renderEthAllowanceToggle()}</div>
<div> ZRX: {this._renderZrxAllowanceToggle()}</div>
</div>
<SetAllowancesOnboardingStep
zrxAllowanceToggle={this._renderZrxAllowanceToggle()}
ethAllowanceToggle={this._renderEthAllowanceToggle()}
/>
),
placement: 'right',
continueButtonDisplay: this._userHasAllowancesForWethAndZrx() ? 'enabled' : 'disabled',

View File

@@ -0,0 +1,27 @@
import * as React from 'react';
import { Container } from 'ts/components/ui/container';
import { Text } from 'ts/components/ui/text';
export interface SetAllowancesOnboardingStepProps {
zrxAllowanceToggle: React.ReactNode;
ethAllowanceToggle: React.ReactNode;
}
export const SetAllowancesOnboardingStep: React.StatelessComponent<SetAllowancesOnboardingStepProps> = ({
ethAllowanceToggle,
zrxAllowanceToggle,
}) => (
<div className="flex items-center flex-column">
<Text>Unlock your tokens for trading. You only need to do this once for each token.</Text>
<Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-around">
<div className="flex flex-column items-center">
<Text fontWeight={700}> Enable WETH </Text>
<Container marginTop="10px">{ethAllowanceToggle}</Container>
</div>
<div className="flex flex-column items-center">
<Text fontWeight={700}> Enable ZRX </Text>
<Container marginTop="10px">{zrxAllowanceToggle}</Container>
</div>
</Container>
</div>
);