Skip to content

Commit de8ca67

Browse files
Migrate the chakra imports to Tailwind.
1 parent 2e51d18 commit de8ca67

File tree

1 file changed

+12
-31
lines changed
  • src/components/Staking/StakingConsiderations

1 file changed

+12
-31
lines changed

src/components/Staking/StakingConsiderations/index.tsx

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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"
23

34
import type { StakingPage } from "@/lib/types"
45

@@ -8,8 +9,6 @@ import {
89
GreenCheckProductGlyphIcon,
910
WarningProductGlyphIcon,
1011
} from "@/components/icons/staking"
11-
import OldHeading from "@/components/OldHeading"
12-
import Text from "@/components/OldText"
1312
import Translation from "@/components/Translation"
1413

1514
import { trackCustomEvent } from "@/lib/utils/matomo"
@@ -37,11 +36,11 @@ const IndicatorGroup = ({
3736
return <WarningProductGlyphIcon style={style} />
3837
}
3938
return (
40-
<VStack spacing={2} flex={1}>
39+
<VStack className="flex-1 p-2">
4140
<IndicatorIcon style={styleObj} />
42-
<Text fontSize="xs" textAlign="center" maxW="{40}">
41+
<p className="max-w-[10rem] text-center text-xs">
4342
<Translation id={label} />
44-
</Text>
43+
</p>
4544
</VStack>
4645
)
4746
}
@@ -51,9 +50,6 @@ export type StakingConsiderationsProps = {
5150
}
5251

5352
const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
54-
// TODO: Replace with direct token implementation after UI migration is completed
55-
const mdBp = useToken("breakpoints", "md")
56-
5753
const {
5854
StyledSvg,
5955
caution,
@@ -75,10 +71,10 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
7571
}
7672

7773
return (
78-
<Flex flexDir={{ base: "column", md: "row" }}>
74+
<Flex className="flex-col md:flex-row">
7975
<ButtonDropdown list={dropdownLinks} className="mb-4 md:hidden" />
8076
{/* TODO: Improve a11y */}
81-
<Box flex={1} hideBelow={mdBp}>
77+
<div className="hidden flex-1 md:block">
8278
{!!pageData && (
8379
<List m={0}>
8480
{/* TODO: Make mobile responsive */}
@@ -107,27 +103,12 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
107103
))}
108104
</List>
109105
)}
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">
119108
<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">
131112
{!!valid && (
132113
<IndicatorGroup
133114
label={valid}

0 commit comments

Comments
 (0)