Skip to content

Commit 5ad3871

Browse files
committed
feat: migrate ContributorsQuizBanner to tailwind
1 parent e4d547f commit 5ad3871

File tree

1 file changed

+25
-37
lines changed

1 file changed

+25
-37
lines changed

src/components/Banners/ContributorsQuizBanner.tsx

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import { Box, Flex, Heading, Text } from "@chakra-ui/react"
2-
3-
import { Image } from "@/components/Image"
4-
51
import { cn } from "@/lib/utils/cn"
62

73
import { ButtonLink } from "../Buttons"
8-
9-
import PeopleLearning from "@/public/images/people-learning.png"
4+
import { Stack } from "../ui/flex"
105

116
// TODO: refactor to use CalloutBanner component
127
function ContributorsQuizBanner(props: React.HTMLAttributes<HTMLDivElement>) {
@@ -18,47 +13,40 @@ function ContributorsQuizBanner(props: React.HTMLAttributes<HTMLDivElement>) {
1813
)}
1914
{...props}
2015
>
21-
<Flex
22-
flex="1 1 50%"
23-
position="relative"
24-
justify={{ base: "center", md: "end" }}
25-
align="end"
26-
minH={{ base: 200, md: "auto" }}
27-
px={{ base: 8, md: 0 }}
16+
{/* TODO: fix image */}
17+
{/* <Flex
18+
className={cn(
19+
"relative flex-[1_1_50%]",
20+
"justify-center md:justify-end",
21+
"items-end",
22+
"md:min-h-auto min-h-[100px]",
23+
"px-8 md:px-0",
24+
"w-20"
25+
)}
2826
>
29-
<Image
30-
position="absolute"
27+
<TwImage
3128
src={PeopleLearning}
3229
alt="People learning about Ethereum"
33-
w="full"
34-
maxH="120%"
35-
style={{
36-
objectFit: "contain",
37-
}}
30+
className="absolute max-h-[120%] w-full object-contain"
3831
/>
39-
<Box hideFrom="md" borderBottom="1px solid #D3C5F1" w="full" />
40-
</Flex>
41-
<Flex
42-
flex="1 1 50%"
43-
flexDir="column"
44-
gap="8"
45-
py="8"
46-
ps="8"
47-
pe={{ base: 8, lg: 0 }}
32+
<div className="w-full border-b border-[#D3C5F1] md:hidden" />
33+
</Flex> */}
34+
<Stack
35+
className={cn("flex-[1_1_50%]", "gap-8 py-8 ps-8", "pe-8 lg:pe-0")}
4836
>
49-
<Flex gap="2" flexDir="column">
50-
<Heading size="lg">Unsure where to start?</Heading>
51-
<Text size="lg" color="body.base">
37+
<Stack>
38+
<h2>Unsure where to start?</h2>
39+
<p className="text-lg text-body">
5240
Take a quick quiz and find out how you can contribute on
5341
ethereum.org.
54-
</Text>
55-
</Flex>
56-
<Box>
42+
</p>
43+
</Stack>
44+
<div>
5745
<ButtonLink href="https://ethdotorg.typeform.com/contributor">
5846
Take a quiz
5947
</ButtonLink>
60-
</Box>
61-
</Flex>
48+
</div>
49+
</Stack>
6250
</aside>
6351
)
6452
}

0 commit comments

Comments
 (0)