diff options
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 10 | ||||
-rw-r--r-- | packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx | 27 |
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> +); |