Skip to content

Commit 36b5b43

Browse files
refactor(trilemma): implement useToken for breakpoint vals
1 parent dc824e7 commit 36b5b43

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/Trilemma/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Hide,
1010
Show,
1111
Text,
12+
useToken,
1213
} from "@chakra-ui/react"
1314
import Card from "../Card"
1415
import Translation from "../Translation"
@@ -31,6 +32,9 @@ const Trilemma: React.FC<IProps> = () => {
3132
...trilemmaChecks,
3233
}
3334

35+
// TODO: Replace with direct token implementation after UI migration is completed
36+
const lgBp = useToken("breakpoints", "lg")
37+
3438
return (
3539
<Flex
3640
alignItems="flex-start"
@@ -59,19 +63,16 @@ const Trilemma: React.FC<IProps> = () => {
5963
<Text>
6064
<Translation id="page-upgrades-vision-trilemma-p-2" />
6165
</Text>
62-
{/* TODO: replace `l` with `lg` after UI migration */}
63-
<Show below="l">
66+
<Show below={lgBp}>
6467
<Text fontWeight={600}>
6568
<Translation id="page-upgrades-vision-trilemma-modal-tip" />:
6669
</Text>
6770
</Show>
68-
{/* TODO: replace `l` with `lg` after UI migration */}
69-
<Hide below="l">
71+
<Hide below={lgBp}>
7072
<Card {...cardDetail} mt={8} minH="300px" />
7173
</Hide>
7274
</Flex>
73-
{/* TODO: replace `l` with `lg` after UI migration */}
74-
<Hide above="l">
75+
<Hide above={lgBp}>
7576
<Drawer
7677
isOpen={mobileModalOpen}
7778
onClose={handleModalClose}

0 commit comments

Comments
 (0)