aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx
blob: b21b39341667cba0ec8530a853ef8f0f9b663cf5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { colors } from '@0xproject/react-shared';
import * as React from 'react';
import { Container } from 'ts/components/ui/container';
import { IconButton } from 'ts/components/ui/icon_button';
import { Text } from 'ts/components/ui/text';

export interface WrapEthOnboardingStepProps {
    formattedEthBalanceIfExists?: string;
}

export const WrapEthOnboardingStep: React.StatelessComponent<WrapEthOnboardingStepProps> = ({
    formattedEthBalanceIfExists,
}) => {
    if (formattedEthBalanceIfExists) {
        return (
            <div className="flex items-center flex-column">
                <Text>Congrats you now have {formattedEthBalanceIfExists} in your wallet.</Text>
                <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
                    <div className="flex flex-column items-center">
                        <Text fontWeight={700}> 1 ETH </Text>
                        <img src="/images/eth_dollar.svg" height="75px" width="75x" />
                    </div>
                    <Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
                        <Text fontSize="25px">
                            <i className="zmdi zmdi-long-arrow-right" />
                        </Text>
                    </Container>
                    <div className="flex flex-column items-center">
                        <Text fontWeight={700}> 1 WETH </Text>
                        <img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
                    </div>
                </Container>
            </div>
        );
    } else {
        return (
            <div className="flex items-center flex-column">
                <Text>
                    You need to convert some of your ETH into tradeable <b>Wrapped ETH (WETH)</b>.
                </Text>
                <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
                    <div className="flex flex-column items-center">
                        <Text fontWeight={700}> 1 ETH </Text>
                        <img src="/images/eth_dollar.svg" height="75px" width="75x" />
                    </div>
                    <Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
                        <Text fontSize="36px">=</Text>
                    </Container>
                    <div className="flex flex-column items-center">
                        <Text fontWeight={700}> 1 WETH </Text>
                        <img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
                    </div>
                </Container>
                <Text>
                    Think of it like the coin version of a paper note. It has the same value, but some machines only
                    take coins.
                </Text>
                <Text>
                    Click
                    <Container display="inline-block" marginLeft="10px" marginRight="10px">
                        <IconButton
                            iconName="zmdi-long-arrow-down"
                            color={colors.mediumBlue}
                            labelText="wrap"
                            display="inline-flex"
                        />
                    </Container>
                    to wrap your ETH.
                </Text>
            </div>
        );
    }
};