Skip to content

Commit b3f7b5d

Browse files
committed
migrate StepByStepInstructions to Shadcn/tailwind
1 parent 72c2e1f commit b3f7b5d

File tree

1 file changed

+12
-35
lines changed

1 file changed

+12
-35
lines changed

src/components/Translatathon/StepByStepInstructions.tsx

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Center, Flex, Text } from "@chakra-ui/react"
2-
31
import { ButtonLink } from "@/components/Buttons"
42

53
import { CROWDIN_PROJECT_URL } from "@/lib/constants"
64

5+
import { Center, Flex } from "../ui/flex"
6+
77
import {
88
APPLICATION_END_DATE,
99
APPLICATION_START_DATE,
@@ -70,46 +70,23 @@ export const StepByStepInstructions = () => {
7070
const appLive = todaysDate >= appStartDate && todaysDate <= appEndDate
7171

7272
return (
73-
<Flex w="full" flexDir="column">
73+
<Flex className="w-full flex-col">
7474
{instructions.map((instruction, index) => (
7575
<Flex
7676
key={index}
77-
w="full"
78-
justifyContent="space-between"
79-
p={4}
80-
borderBottom="1px solid"
81-
borderColor="body.light"
82-
gap={4}
83-
flexDir={{ base: "column", md: "row" }}
84-
alignItems={{ base: "left", md: "center" }}
77+
className="w-full flex-col items-start justify-between gap-4 border-b border-body-light p-4 md:flex-row md:items-center"
8578
>
86-
<Flex
87-
gap={4}
88-
flexDir={{ base: "column", md: "row" }}
89-
alignItems={{ base: "left", md: "center" }}
90-
>
91-
<Center
92-
minWidth="46px"
93-
maxWidth="46px"
94-
h="46px"
95-
borderRadius={8}
96-
background="background.base"
97-
boxShadow="2px 6px 18px 0px rgba(0, 0, 0, 0.10)"
98-
p={1}
99-
>
100-
<Text fontSize="4xl" fontWeight="bold" color="primary.base">
101-
{index + 1}
102-
</Text>
79+
<Flex className="flec-col align-left md:align-center gap-4 md:flex-row">
80+
<Center className="bg-background-base h-[46px] min-w-[46px] max-w-[46px] rounded-lg p-1 shadow-[2px_6px_18px_rgba(0,0,0,0.1)]">
81+
<p className="text-4xl font-bold text-primary">{index + 1}</p>
10382
</Center>
104-
<Flex flexDir="column">
105-
<Text fontSize="xl" fontWeight="bold">
106-
{instruction.title}
107-
</Text>
108-
<Text>{instruction.description}</Text>
83+
<Flex className="flex-col">
84+
<p className="text-xl font-bold">{instruction.title}</p>
85+
<p>{instruction.description}</p>
10986
</Flex>
11087
</Flex>
11188
{instruction.ctaLink ? (
112-
<Flex height="42px">
89+
<Flex className="h-[42px]">
11390
<ButtonLink
11491
href={instruction.ctaLink}
11592
variant="outline"
@@ -119,7 +96,7 @@ export const StepByStepInstructions = () => {
11996
</ButtonLink>
12097
</Flex>
12198
) : (
122-
<Flex w="140px" />
99+
<Flex className="w-[140px]" />
123100
)}
124101
</Flex>
125102
))}

0 commit comments

Comments
 (0)