1
- import { Box , Flex , List , ListItem , useToken , VStack } from "@chakra-ui/react"
1
+ import { List , ListItem } from "@chakra-ui/react"
2
+ import { VStack , Flex } from "@/components/ui/flex"
2
3
3
4
import type { StakingPage } from "@/lib/types"
4
5
8
9
GreenCheckProductGlyphIcon ,
9
10
WarningProductGlyphIcon ,
10
11
} from "@/components/icons/staking"
11
- import OldHeading from "@/components/OldHeading"
12
- import Text from "@/components/OldText"
13
12
import Translation from "@/components/Translation"
14
13
15
14
import { trackCustomEvent } from "@/lib/utils/matomo"
@@ -37,11 +36,11 @@ const IndicatorGroup = ({
37
36
return < WarningProductGlyphIcon style = { style } />
38
37
}
39
38
return (
40
- < VStack spacing = { 2 } flex = { 1 } >
39
+ < VStack className = " flex-1 p-2" >
41
40
< IndicatorIcon style = { styleObj } />
42
- < Text fontSize = "xs" textAlign = " center" maxW = "{40} ">
41
+ < p className = "max-w-[10rem] text- center text-xs ">
43
42
< Translation id = { label } />
44
- </ Text >
43
+ </ p >
45
44
</ VStack >
46
45
)
47
46
}
@@ -51,9 +50,6 @@ export type StakingConsiderationsProps = {
51
50
}
52
51
53
52
const StakingConsiderations = ( { page } : StakingConsiderationsProps ) => {
54
- // TODO: Replace with direct token implementation after UI migration is completed
55
- const mdBp = useToken ( "breakpoints" , "md" )
56
-
57
53
const {
58
54
StyledSvg,
59
55
caution,
@@ -75,10 +71,10 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
75
71
}
76
72
77
73
return (
78
- < Flex flexDir = { { base : "column" , md : " row" } } >
74
+ < Flex className = "flex-col md:flex- row">
79
75
< ButtonDropdown list = { dropdownLinks } className = "mb-4 md:hidden" />
80
76
{ /* TODO: Improve a11y */ }
81
- < Box flex = { 1 } hideBelow = { mdBp } >
77
+ < div className = "hidden flex-1 md:block" >
82
78
{ ! ! pageData && (
83
79
< List m = { 0 } >
84
80
{ /* TODO: Make mobile responsive */ }
@@ -107,27 +103,12 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
107
103
) ) }
108
104
</ List >
109
105
) }
110
- </ Box >
111
- < Flex
112
- alignItems = "center"
113
- flexDir = "column"
114
- bg = "background.highlight"
115
- flex = { 2 }
116
- minH = "410px"
117
- p = { 6 }
118
- >
106
+ </ div >
107
+ < Flex className = "felx-col bg-highlight flex-2 min-h-[410px] items-center p-6" >
119
108
< StyledSvg />
120
- < OldHeading
121
- as = "h3"
122
- fontWeight = { 700 }
123
- fontSize = "27px"
124
- lineHeight = { 1.4 }
125
- mt = { 10 }
126
- >
127
- { title }
128
- </ OldHeading >
129
- < Text > { description } </ Text >
130
- < Flex gap = { 8 } justifyContent = "center" mt = "auto" >
109
+ < h3 className = "mt-10 text-[27px] font-bold leading-[1.4]" > { title } </ h3 >
110
+ < p > { description } </ p >
111
+ < Flex className = "mt-auto justify-center gap-8" >
131
112
{ ! ! valid && (
132
113
< IndicatorGroup
133
114
label = { valid }
0 commit comments