1
1
import { useTranslation } from "next-i18next"
2
2
import { MdArrowForward } from "react-icons/md"
3
- import {
4
- Box ,
5
- Flex ,
6
- Heading ,
7
- Icon ,
8
- LinkBox ,
9
- LinkOverlay ,
10
- } from "@chakra-ui/react"
11
3
12
4
import { ChildOnlyProp , TranslationKey } from "@/lib/types"
13
5
6
+ import { ButtonLink } from "@/components/ui/buttons/Button"
7
+ import { Flex } from "@/components/ui/flex"
8
+ import InlineLink , { BaseLink } from "@/components/ui/Link"
9
+ import { LinkBox , LinkOverlay } from "@/components/ui/link-box"
10
+
14
11
import { Accordion } from "../../../tailwind/ui/accordion"
15
- import { ButtonLink } from "../Buttons"
16
12
import CardList from "../CardList"
17
13
import InfoBanner from "../InfoBanner"
18
- import InlineLink , { BaseLink } from "../Link"
19
- import OldHeading from "../OldHeading"
20
- import Text from "../OldText"
21
14
import Translation from "../Translation"
22
15
23
16
import {
@@ -28,19 +21,11 @@ import {
28
21
import { useStablecoinAccordion } from "./useStablecoinAccordion"
29
22
30
23
const SectionTitle = ( props : ChildOnlyProp ) => (
31
- < OldHeading
32
- as = "h4"
33
- fontSize = "1.25rem"
34
- fontWeight = { 700 }
35
- lineHeight = "22px"
36
- textAlign = "start"
37
- mt = { 0 }
38
- { ...props }
39
- />
24
+ < h4 className = "mb-8 mt-0 text-start text-xl font-bold" { ...props } />
40
25
)
41
26
42
27
const StepBoxContainer = ( props : ChildOnlyProp ) => (
43
- < Box mt = { 4 } mb = { 8 } { ...props } />
28
+ < div className = "mb-8 mt-4" { ...props } />
44
29
)
45
30
46
31
const StepBox = (
@@ -49,51 +34,27 @@ const StepBox = (
49
34
const { t } = useTranslation ( "page-stablecoins" )
50
35
51
36
return (
52
- < Flex
53
- as = { LinkBox }
54
- alignItems = { { base : "flex-start" , md : "normal" } }
55
- background = "background.base"
56
- border = "1px"
57
- borderColor = "border"
58
- color = "text"
59
- flexDirection = { { base : "column" , md : "row" } }
60
- p = { 4 }
61
- sx = { {
62
- "&:not(:first-of-type)" : {
63
- mt : "-1px" ,
64
- } ,
65
- } }
66
- _hover = { {
67
- background : "ednBackground" ,
68
- transition : "transform 0.2s" ,
69
- transform : "scale(1.05)" ,
70
- } }
71
- >
72
- < Flex justifyContent = "space-between" alignItems = "center" width = "100%" >
73
- < Box >
74
- < LinkOverlay
75
- as = { BaseLink }
76
- color = "inherit"
77
- textDecoration = "inherit"
78
- href = { props . href }
79
- fontWeight = { 700 }
80
- textAlign = "start"
81
- _hover = { {
82
- textDecoration : "inherit" ,
83
- } }
84
- >
85
- { t ( props . titleId ) }
37
+ < LinkBox className = "flex flex-col items-start border bg-background p-4 transition-transform duration-200 hover:scale-105 hover:bg-background-highlight not-[:first]:-mt-px md:flex-row md:items-stretch" >
38
+ < Flex className = "w-full items-center justify-between" >
39
+ < div >
40
+ < LinkOverlay asChild >
41
+ < BaseLink
42
+ className = "text-start font-bold text-inherit no-underline hover:no-underline"
43
+ href = { props . href }
44
+ >
45
+ { t ( props . titleId ) }
46
+ </ BaseLink >
86
47
</ LinkOverlay >
87
- < Text mb = { 0 } > { t ( props . descId ) } </ Text >
88
- </ Box >
89
- < Icon as = { MdArrowForward } ms = { 4 } minW = { 6 } />
48
+ < p className = "mb-0" > { t ( props . descId ) } </ p >
49
+ </ div >
50
+ < MdArrowForward className = "ms-4 min-w-6" />
90
51
</ Flex >
91
- </ Flex >
52
+ </ LinkBox >
92
53
)
93
54
}
94
55
95
56
const H4 = ( props : ChildOnlyProp ) => (
96
- < Heading fontSize = "1.25rem" fontWeight = { 700 } mb = { 4 } { ...props } />
57
+ < h4 className = "mb-4 text-xl font-bold" { ...props } />
97
58
)
98
59
99
60
const StablecoinAccordion = ( ) => {
@@ -124,7 +85,9 @@ const StablecoinAccordion = () => {
124
85
</ StepBoxContainer >
125
86
< InfoBanner emoji = ":light_bulb:" >
126
87
< H4 > { t ( "page-stablecoins-accordion-swap-editors-tip" ) } </ H4 >
127
- < Text > { t ( "page-stablecoins-accordion-swap-editors-tip-copy" ) } </ Text >
88
+ < p className = "mb-6 leading-6" >
89
+ { t ( "page-stablecoins-accordion-swap-editors-tip-copy" ) }
90
+ </ p >
128
91
< ButtonLink href = "/wallets/find-wallet/" >
129
92
{ t ( "page-stablecoins-accordion-swap-editors-tip-button" ) }
130
93
</ ButtonLink >
@@ -134,12 +97,12 @@ const StablecoinAccordion = () => {
134
97
< SectionTitle >
135
98
{ t ( "page-stablecoins-accordion-swap-dapp-title" ) }
136
99
</ SectionTitle >
137
- < Text >
100
+ < p className = "mb-6 leading-6" >
138
101
< Translation id = "page-stablecoins:page-stablecoins-accordion-swap-dapp-intro" /> { " " }
139
102
< InlineLink href = "/get-eth/#dex" >
140
103
{ t ( "page-stablecoins-accordion-swap-dapp-link" ) }
141
104
</ InlineLink >
142
- </ Text >
105
+ </ p >
143
106
< CardList
144
107
items = { cardListGroups . dapps }
145
108
imageWidth = { DEFAULT_IMAGE_WIDTH }
@@ -151,9 +114,9 @@ const StablecoinAccordion = () => {
151
114
< SectionTitle >
152
115
{ t ( "page-stablecoins-accordion-requirements" ) }
153
116
</ SectionTitle >
154
- < Text >
117
+ < p className = "mb-6 leading-6" >
155
118
{ t ( "page-stablecoins-accordion-buy-requirements-description" ) }
156
- </ Text >
119
+ </ p >
157
120
< StepBoxContainer >
158
121
< StepBox
159
122
href = "/get-eth/"
@@ -180,9 +143,9 @@ const StablecoinAccordion = () => {
180
143
< SectionTitle >
181
144
{ t ( "page-stablecoins-accordion-requirements" ) }
182
145
</ SectionTitle >
183
- < Text >
146
+ < p className = "mb-6 leading-6" >
184
147
{ t ( "page-stablecoins-accordion-earn-requirements-description" ) }
185
- </ Text >
148
+ </ p >
186
149
< StepBoxContainer >
187
150
< StepBox
188
151
href = "/wallets/"
@@ -195,7 +158,9 @@ const StablecoinAccordion = () => {
195
158
< SectionTitle >
196
159
{ t ( "page-stablecoins-accordion-earn-projects-title" ) }
197
160
</ SectionTitle >
198
- < Text > { t ( "page-stablecoins-accordion-earn-projects-copy" ) } </ Text >
161
+ < p className = "mb-6 leading-6" >
162
+ { t ( "page-stablecoins-accordion-earn-projects-copy" ) }
163
+ </ p >
199
164
< CardList
200
165
items = { cardListGroups . earn }
201
166
imageWidth = { DEFAULT_IMAGE_WIDTH }
@@ -207,9 +172,9 @@ const StablecoinAccordion = () => {
207
172
< SectionTitle >
208
173
{ t ( "page-stablecoins-accordion-requirements" ) }
209
174
</ SectionTitle >
210
- < Text >
175
+ < p className = "mb-6 leading-6" >
211
176
{ t ( "page-stablecoins-accordion-borrow-requirements-description" ) }
212
- </ Text >
177
+ </ p >
213
178
< StepBoxContainer >
214
179
< StepBox
215
180
href = "/wallets/"
@@ -225,36 +190,38 @@ const StablecoinAccordion = () => {
225
190
< SectionTitle >
226
191
{ t ( "page-stablecoins-accordion-borrow-crypto-collateral" ) }
227
192
</ SectionTitle >
228
- < Text >
193
+ < p className = "mb-6 leading-6" >
229
194
{ t ( "page-stablecoins-accordion-borrow-crypto-collateral-copy" ) } { " " }
230
195
< InlineLink href = "#how" >
231
196
{ t ( "page-stablecoins-accordion-borrow-crypto-collateral-link" ) }
232
197
</ InlineLink >
233
- </ Text >
234
- < Text >
198
+ </ p >
199
+ < p className = "mb-6 leading-6" >
235
200
{ t ( "page-stablecoins-accordion-borrow-crypto-collateral-copy-p2" ) }
236
- </ Text >
201
+ </ p >
237
202
</ LeftColumnPanel >
238
203
< RightColumnPanel >
239
204
< SectionTitle >
240
205
{ t ( "page-stablecoins-accordion-borrow-places-title" ) }
241
206
</ SectionTitle >
242
- < Text > { t ( "page-stablecoins-accordion-borrow-places-intro" ) } </ Text >
243
- < Box mb = { 8 } >
207
+ < p className = "mb-6 leading-6" >
208
+ { t ( "page-stablecoins-accordion-borrow-places-intro" ) }
209
+ </ p >
210
+ < div className = "mb-8" >
244
211
< CardList
245
212
items = { cardListGroups . borrow }
246
213
imageWidth = { DEFAULT_IMAGE_WIDTH }
247
214
/>
248
- </ Box >
215
+ </ div >
249
216
< SectionTitle >
250
217
{ t ( "page-stablecoins-accordion-borrow-risks-title" ) }
251
218
</ SectionTitle >
252
- < Text >
219
+ < p className = "mb-6 leading-6" >
253
220
{ t ( "page-stablecoins-accordion-borrow-risks-copy" ) } { " " }
254
221
< InlineLink href = "/eth/" >
255
222
{ t ( "page-stablecoins-accordion-borrow-risks-link" ) }
256
223
</ InlineLink >
257
- </ Text >
224
+ </ p >
258
225
</ RightColumnPanel >
259
226
</ AccordionCustomItem >
260
227
</ Accordion >
0 commit comments