-
Notifications
You must be signed in to change notification settings - Fork 1
/
Hero.jsx
150 lines (133 loc) · 3.46 KB
/
Hero.jsx
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
const media = {
mobile: "@media(max-width: 768px)",
tablet: "@media(min-width: 768px)",
};
const SectionHeroStyle = styled.div`
border: 2px solid #0e6efd;
border-radius: 10px;
padding: 20px;
display: flex;
align-items: center;
justify-content: center;
width: 840px;
height: 224px;
max-width: 840px;
.hero-container {
${media.tablet} {
margin-inline: auto;
max-width: 900px;
}
}
.hero-content {
justify-content: center;
${media.tablet} {
grid-template-columns: max-content max-content;
}
.hero-data {
text-align: center;
${media.tablet} {
text-align: initial;
}
.hero-title {
font-size: 2rem;
font-weight: bold;
color: #0e6efd;
}
.hero-subtitle {
font-size: 1.5rem;
color: #555;
font-weight: 500;
margin-bottom: 0.75rem;
}
.hero-description {
font-size: 1rem;
margin-bottom: 2rem;
}
}
}
`;
const IconStyle = styled.div`
margin: 20px;
color: #0e6efd;
`;
const MobileData = ({ size, color, stroke, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-mobiledata"
width={size}
height={size}
viewBox="0 0 24 24"
stroke-width={stroke}
stroke={color}
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
{...props}
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M16 12v-8" />
<path d="M8 20v-8" />
<path d="M13 7l3 -3l3 3" />
<path d="M5 17l3 3l3 -3" />
</svg>
);
const LineStyle = styled.div`
display: flex;
align-items: center;
justify-content: center;
`;
const ButtonStyle = styled.div`
display: flex;
flex-direction: row;
gap: 10px;
`;
const ContinueButtonStyle = styled.button`
background-color: white;
padding: 4px;
color: ${(props) => (props.disabled ? "gray" : "green")};
border: 1px solid ${(props) => (props.disabled ? "gray" : "green")};
border-radius:6px;
width: 172px;
&:hover {
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
color: ${(props) => (props.disabled ? "gray" : "white")};
background-color: ${(props) => (props.disabled ? "white" : "green")};
transition: 0.3s;
}
`;
function Hero() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
return (
<SectionHeroStyle>
<div className="hero-container row container">
<div className="row hero-content">
<div className="hero-data">
<h1 className="hero-title">
Hi, it's{" "}
<span style={{ color: "var(--first-color)" }}>Packet</span>
</h1>
<h3 className="hero-subtitle">
Decentralized Mobile Data Marketplace
</h3>
<p className="hero-description">
Exchange your mobile data cross-carrier seamlessly.{" "}
</p>
<ButtonStyle>
<Web3Connect connectLabel="Connect with wallet" />
<ContinueButtonStyle
onClick={() => props.redirect && props.redirect("/app")}
disabled={!Ethers.provider()}
>
Launch Packet App
</ContinueButtonStyle>
</ButtonStyle>
</div>
</div>
</div>
<IconStyle>
<MobileData size={64} color={"currentColor"} stroke={2} />
</IconStyle>
</SectionHeroStyle>
);
}
return <Hero {...props} />;