1
1
import React from "react"
2
2
import { useTranslation } from "next-i18next"
3
3
import { IconBase } from "react-icons"
4
- import {
5
- cssVar ,
6
- Heading ,
7
- Icon ,
8
- SimpleGrid ,
9
- Text ,
10
- useToken ,
11
- VStack ,
12
- } from "@chakra-ui/react"
13
- import { Center , Flex } from "@/components/ui/flex"
4
+ import { cssVar , Icon , SimpleGrid , Text , useToken } from "@chakra-ui/react"
5
+ import { Center , VStack , Flex } from "@/components/ui/flex"
14
6
15
7
import { ChildOnlyProp } from "@/lib/types"
16
8
@@ -153,15 +145,13 @@ const Header = ({ children }: ChildOnlyProp) => (
153
145
)
154
146
155
147
const HeadingEl = ( { children } : ChildOnlyProp ) => (
156
- < Heading
157
- color = { $colorVar . reference }
158
- fontSize = "2rem"
159
- fontWeight = { 600 }
160
- lineHeight = { 1.4 }
161
- textAlign = { { base : "center" , md : "initial" } }
148
+ < h1
149
+ className = "text-($colorVar.reference) text-center text-[2rem] font-semibold leading-[1.4] md:text-start"
150
+ /* This value needs to be updated across the file.
151
+ color={$colorVar.reference} */
162
152
>
163
153
{ children }
164
- </ Heading >
154
+ </ h1 >
165
155
)
166
156
// Todo: The removed sx prop will be added by creating a separate function for Text like we have HeadingEl. This will also help to migrate the Text component.
167
157
const Pills = ( { children } : ChildOnlyProp ) => (
@@ -170,9 +160,18 @@ const Pills = ({ children }: ChildOnlyProp) => (
170
160
</ Flex >
171
161
)
172
162
163
+ const TextEl = ( { children } : ChildOnlyProp ) => (
164
+ < p
165
+ className = { `after:content-["] relative m-0 whitespace-nowrap px-1.5 py-0.5 text-[colorVar.reference] after:absolute after:start-0 after:top-0 after:box-content after:rounded after:bg-[var(colorVar.reference)] after:opacity-[.125]` }
166
+ >
167
+ { children }
168
+ </ p >
169
+ )
170
+
173
171
type GlyphProps = { glyphIcon : typeof IconBase }
174
172
const Glyph = ( { glyphIcon } : GlyphProps ) => (
175
173
< Center
174
+ //Need to set the base styles we've had previously ie. gridArea="base:content"
176
175
style = { {
177
176
gridArea : "glyph" ,
178
177
} }
@@ -212,28 +211,18 @@ const StakingHierarchy = () => {
212
211
)
213
212
214
213
return (
215
- < VStack
216
- bgGradient = "linear(rgba(237, 194, 84, 0.1) 13.39%, rgba(75, 231, 156, 0.1) 44.21%, rgba(231, 202, 200, 0.1) 82.88%)"
217
- borderRadius = { { base : 0 , md : "lg" } }
218
- spacing = { { base : 16 , md : 0 } }
219
- p = { 8 }
220
- borderInlineStart = { { base : "4px" , md : "none" } }
221
- borderInlineEnd = { 0 }
222
- sx = { {
223
- borderImage : `linear-gradient(to bottom, ${ stakingGold } 5%, ${ stakingGreen } 30%, ${ stakingBlue } 55%, ${ stakingRed } 80%) 1 100%` ,
224
- } }
225
- >
214
+ < VStack className = "border-gradient-to-b border-gradient-gold-green-blue-red space-y-16 rounded-none border-l-4 border-r-0 bg-gradient-to-b from-[rgba(237,194,84,0.1)] via-[rgba(75,231,156,0.1)] to-[rgba(231,202,200,0.1)] p-8 md:space-y-0 md:rounded-lg md:border-l-0" >
226
215
< SectionGrid number = { 1 } >
227
216
< StyledEtherSvg className = "size-[100%] text-staking-gold" />
228
217
< Line />
229
218
< Header >
230
219
< HeadingEl > { t ( "page-staking-hierarchy-solo-h2" ) } </ HeadingEl >
231
220
< Pills >
232
- < p
233
- className = { `after:content-["] relative m-0 whitespace-nowrap px-1.5 py-0.5 text-[colorVar.reference] after:absolute after:start-0 after:top-0 after:box-content after:rounded after:bg-[var( colorVar.reference) ] after:opacity-[.125]` }
221
+ < Text
222
+ className = { `after:content-["] relative m-0 whitespace-nowrap px-1.5 py-0.5 text-[$ colorVar.reference] after:absolute after:start-0 after:top-0 after:box-content after:rounded after:bg-[$ colorVar.reference] after:opacity-[.125]` }
234
223
>
235
224
< em > { t ( "page-staking-hierarchy-solo-pill-1" ) } </ em >
236
- </ p >
225
+ </ Text >
237
226
< Text
238
227
className = { `after:content-["] relative m-0 whitespace-nowrap px-1.5 py-0.5 text-[$colorVar.reference] after:absolute after:start-0 after:top-0 after:box-content after:rounded after:bg-[$colorVar.reference] after:opacity-[.125]` }
239
228
>
0 commit comments