1
1
import React from "react"
2
+ import { Box , Flex , Heading } from "@chakra-ui/react"
3
+
2
4
import { useStaticQuery , graphql } from "gatsby"
3
- import styled from "@emotion/styled"
4
5
import { useIntl } from "react-intl"
5
6
6
7
import { translateMessageId } from "../utils/translations"
@@ -13,50 +14,17 @@ import Translation from "./Translation"
13
14
14
15
import type { CardListItem } from "./CardList"
15
16
16
- const Container = styled . div `
17
- margin-bottom: 4rem;
18
- `
19
-
20
- const StyledCardContainer = styled . div `
21
- display: flex;
22
- padding-top: 1rem;
23
- @media (max-width: ${ ( props ) => props . theme . breakpoints . m } ) {
24
- flex-direction: column;
25
- }
26
- `
27
-
28
- const StyledCardLeft = styled ( Card ) `
29
- margin-left: 0rem;
30
- margin-right: 1rem;
31
- width: 100%;
32
- @media (max-width: ${ ( props ) => props . theme . breakpoints . m } ) {
33
- margin-right: 0rem;
34
- margin-bottom: 2rem;
35
- }
36
- `
37
-
38
- const StyledCardRight = styled ( Card ) `
39
- margin-left: 0rem;
40
- margin-left: 1rem;
41
- width: 100%;
42
- @media (max-width: ${ ( props ) => props . theme . breakpoints . m } ) {
43
- margin-left: 0rem;
44
- }
45
- `
46
-
47
- const H3 = styled . h3 `
48
- font-size: 1.5rem;
49
- font-weight: 700;
50
- margin-bottom: 2rem;
51
-
52
- a {
53
- display: none;
54
- }
55
- `
56
-
57
- const StyledButtonLink = styled ( ButtonLink ) `
58
- margin-bottom: 0.75rem;
59
- `
17
+ const H3 : React . FC < { children : React . ReactNode } > = ( { children } ) => (
18
+ < Heading
19
+ as = "h3"
20
+ fontSize = "2xl"
21
+ fontWeight = "bold"
22
+ mb = { 8 }
23
+ sx = { { a : { display : "none" } } }
24
+ >
25
+ { children }
26
+ </ Heading >
27
+ )
60
28
61
29
export const DataLogo = graphql `
62
30
fragment DataLogo on File {
@@ -140,21 +108,30 @@ const BeaconChainActions: React.FC = () => {
140
108
]
141
109
142
110
return (
143
- < Container >
144
- < StyledCardContainer >
145
- < StyledCardLeft
111
+ < Box mb = { 16 } >
112
+ < Flex flexDir = { { base : "column" , md : "row" } } pt = { 4 } >
113
+ < Box
114
+ as = { Card }
115
+ w = "full"
116
+ ml = { 0 }
117
+ mr = { { base : 0 , md : 4 } }
118
+ mb = { { base : 8 , md : 0 } }
146
119
emoji = ":money_with_wings:"
147
120
title = { translateMessageId ( "consensus-become-staker" , intl ) }
148
121
description = { translateMessageId ( "consensus-become-staker-desc" , intl ) }
149
122
>
150
- < StyledButtonLink to = "https://launchpad.ethereum.org" >
123
+ < ButtonLink mb = { 3 } to = "https://launchpad.ethereum.org" >
151
124
< Translation id = "get-started" />
152
- </ StyledButtonLink >
125
+ </ ButtonLink >
153
126
< ButtonLink variant = "outline" to = "/staking/" >
154
127
< Translation id = "page-upgrades-index-staking-learn" />
155
128
</ ButtonLink >
156
- </ StyledCardLeft >
157
- < StyledCardRight
129
+ </ Box >
130
+ < Box
131
+ as = { Card }
132
+ w = "full"
133
+ mr = { 0 }
134
+ ml = { { base : 0 , md : 4 } }
158
135
emoji = ":computer:"
159
136
title = { translateMessageId ( "consensus-run-beacon-chain" , intl ) }
160
137
description = { translateMessageId (
@@ -165,8 +142,8 @@ const BeaconChainActions: React.FC = () => {
165
142
< ButtonLink variant = "outline" to = "/upgrades/get-involved/" >
166
143
< Translation id = "consensus-run-beacon-chain" />
167
144
</ ButtonLink >
168
- </ StyledCardRight >
169
- </ StyledCardContainer >
145
+ </ Box >
146
+ </ Flex >
170
147
< H3 >
171
148
< Translation id = "consensus-explore" />
172
149
</ H3 >
@@ -176,7 +153,7 @@ const BeaconChainActions: React.FC = () => {
176
153
< Translation id = "read-more" />
177
154
</ H3 >
178
155
< CardList content = { reads } />
179
- </ Container >
156
+ </ Box >
180
157
)
181
158
}
182
159
0 commit comments