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"
5
+
4
6
import { useIntl } from "react-intl"
5
7
6
8
import { translateMessageId } from "../utils/translations"
@@ -13,50 +15,17 @@ import Translation from "./Translation"
13
15
14
16
import type { CardListItem } from "./CardList"
15
17
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
- `
18
+ const H3 : React . FC < { children : React . ReactNode } > = ( { children } ) => (
19
+ < Heading
20
+ as = "h3"
21
+ fontSize = "2xl"
22
+ fontWeight = "bold"
23
+ mb = { 8 }
24
+ sx = { { a : { display : "none" } } }
25
+ >
26
+ { children }
27
+ </ Heading >
28
+ )
60
29
61
30
export const DataLogo = graphql `
62
31
fragment DataLogo on File {
@@ -140,21 +109,28 @@ const BeaconChainActions: React.FC = () => {
140
109
]
141
110
142
111
return (
143
- < Container >
144
- < StyledCardContainer >
145
- < StyledCardLeft
112
+ < Box mb = { 16 } >
113
+ < Flex flexDir = { { base : "column" , md : "row" } } pt = { 4 } >
114
+ < 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
+ </ Card >
130
+ < Card
131
+ w = "full"
132
+ mr = { 0 }
133
+ ml = { { base : 0 , md : 4 } }
158
134
emoji = ":computer:"
159
135
title = { translateMessageId ( "consensus-run-beacon-chain" , intl ) }
160
136
description = { translateMessageId (
@@ -165,8 +141,8 @@ const BeaconChainActions: React.FC = () => {
165
141
< ButtonLink variant = "outline" to = "/upgrades/get-involved/" >
166
142
< Translation id = "consensus-run-beacon-chain" />
167
143
</ ButtonLink >
168
- </ StyledCardRight >
169
- </ StyledCardContainer >
144
+ </ Card >
145
+ </ Flex >
170
146
< H3 >
171
147
< Translation id = "consensus-explore" />
172
148
</ H3 >
@@ -176,7 +152,7 @@ const BeaconChainActions: React.FC = () => {
176
152
< Translation id = "read-more" />
177
153
</ H3 >
178
154
< CardList content = { reads } />
179
- </ Container >
155
+ </ Box >
180
156
)
181
157
}
182
158
0 commit comments