aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-16 09:15:03 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-16 09:15:03 +0800
commit433f830cf33f6383e83cca5e08b1f58bc18a0828 (patch)
treecdb9b8aceba8403c842001599551c3d4207dc39a /packages/website/ts
parent8893bc102c7dc4faf1650180b0b1acddc333cd7a (diff)
downloaddexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar.gz
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar.bz2
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar.lz
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar.xz
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.tar.zst
dexon-sol-tools-433f830cf33f6383e83cca5e08b1f58bc18a0828.zip
Finish set allowance step
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx10
-rw-r--r--packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx27
2 files changed, 32 insertions, 5 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index 11ad88a1f..ad2ada93b 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -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',
diff --git a/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx b/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx
new file mode 100644
index 000000000..1ff248c40
--- /dev/null
+++ b/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx
@@ -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>
+);