@@ -4,14 +4,14 @@ import { IconBase } from "react-icons"
4
4
import {
5
5
Center ,
6
6
cssVar ,
7
- Flex ,
8
7
Heading ,
9
8
Icon ,
10
9
SimpleGrid ,
11
10
Text ,
12
11
useToken ,
13
12
VStack ,
14
13
} from "@chakra-ui/react"
14
+ import { Flex } from "@/components/ui/flex"
15
15
16
16
import { ChildOnlyProp } from "@/lib/types"
17
17
@@ -130,7 +130,7 @@ const Line = () => {
130
130
131
131
return (
132
132
< aside
133
- className = { `realtive after:h-[calc.subtract("100%", "50px")] after:start-[calc.subtract("50%", "2px")] after:z-1 after:border-orange col-span-1 row-span-2 hidden after:absolute after:top-[50px] after:border-s-4 md:block` }
133
+ className = { `realtive after:h-[calc.subtract("100%", "50px")] after:start-[calc.subtract("50%", "2px")] after:content-["] after: z-1 after:border-orange col-span-1 row-span-2 hidden after:absolute after:top-[50px] after:border-s-4 md:block` }
134
134
135
135
/*
136
136
This value needs to be updated.
@@ -143,11 +143,8 @@ const Line = () => {
143
143
144
144
const Header = ( { children } : ChildOnlyProp ) => (
145
145
< Flex
146
- gridArea = "header"
147
- flexDirection = "column"
148
- justify = "center"
149
- alignItems = { { base : "center" , md : "initial" } }
150
- gap = { 2 }
146
+ className = "flex-col justify-center gap-2 sm:items-center md:items-start"
147
+ style = { { gridArea : "header" } }
151
148
>
152
149
{ children }
153
150
</ Flex >
@@ -164,33 +161,9 @@ const HeadingEl = ({ children }: ChildOnlyProp) => (
164
161
{ children }
165
162
</ Heading >
166
163
)
167
-
164
+ // 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.
168
165
const Pills = ( { children } : ChildOnlyProp ) => (
169
- < Flex
170
- flexWrap = "wrap"
171
- gap = { 1 }
172
- justify = { { base : "center" , md : "initial" } }
173
- sx = { {
174
- p : {
175
- color : $colorVar . reference ,
176
- m : 0 ,
177
- position : "relative" ,
178
- py : 0.5 ,
179
- px : 1.5 ,
180
- whiteSpace : "nowrap" ,
181
- _after : {
182
- content : `""` ,
183
- position : "absolute" ,
184
- top : 0 ,
185
- insetInlineStart : 0 ,
186
- boxSize : "100%" ,
187
- background : $colorVar . reference ,
188
- opacity : 0.125 ,
189
- borderRadius : "sm" ,
190
- } ,
191
- } ,
192
- } }
193
- >
166
+ < Flex className = "flex-wrap gap-1 sm:justify-center md:justify-start" >
194
167
{ children }
195
168
</ Flex >
196
169
)
@@ -209,18 +182,17 @@ const Glyph = ({ glyphIcon }: GlyphProps) => (
209
182
210
183
const Content = ( { children } : ChildOnlyProp ) => (
211
184
< Flex
212
- flexDirection = "column "
213
- gridArea = "content"
214
- mt = { { md : 4 } }
215
- mb = { { md : 12 } }
216
- sx = { {
185
+ className = "flex-col gap-4 md:mb-12 md:mt-4 "
186
+ style = { {
187
+ gridArea : "content" ,
188
+ } }
189
+ /* sx={{
217
190
// For use in markdown files
218
191
".gold": {
219
192
color: "stakingGold",
220
193
fontWeight: 600,
221
194
},
222
- } }
223
- gap = { 4 }
195
+ }} */
224
196
>
225
197
{ children }
226
198
</ Flex >
@@ -251,12 +223,26 @@ const StakingHierarchy = () => {
251
223
< Header >
252
224
< HeadingEl > { t ( "page-staking-hierarchy-solo-h2" ) } </ HeadingEl >
253
225
< Pills >
254
- < Text >
226
+ < p
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-[var(colorVar.reference)] after:opacity-[.125]` }
228
+ >
255
229
< em > { t ( "page-staking-hierarchy-solo-pill-1" ) } </ em >
230
+ </ p >
231
+ < Text
232
+ 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]` }
233
+ >
234
+ { t ( "page-staking-hierarchy-solo-pill-2" ) }
235
+ </ Text >
236
+ < Text
237
+ 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]` }
238
+ >
239
+ { t ( "page-staking-hierarchy-solo-pill-3" ) }
240
+ </ Text >
241
+ < Text
242
+ 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]` }
243
+ >
244
+ { t ( "page-staking-hierarchy-solo-pill-4" ) }
256
245
</ Text >
257
- < Text > { t ( "page-staking-hierarchy-solo-pill-2" ) } </ Text >
258
- < Text > { t ( "page-staking-hierarchy-solo-pill-3" ) } </ Text >
259
- < Text > { t ( "page-staking-hierarchy-solo-pill-4" ) } </ Text >
260
246
</ Pills >
261
247
</ Header >
262
248
< Glyph glyphIcon = { StakingGlyphCPUIcon } />
0 commit comments