|
1 |
| -import { Box, Flex, Heading, Text } from "@chakra-ui/react" |
2 |
| - |
3 |
| -import { Image } from "@/components/Image" |
4 |
| - |
5 | 1 | import { cn } from "@/lib/utils/cn"
|
6 | 2 |
|
7 |
| -import { ButtonLink } from "../Buttons" |
| 3 | +import { TwImage } from "../Image" |
| 4 | +import { ButtonLink } from "../ui/buttons/Button" |
| 5 | +import { Flex, Stack } from "../ui/flex" |
8 | 6 |
|
9 | 7 | import PeopleLearning from "@/public/images/people-learning.png"
|
10 | 8 |
|
11 | 9 | // TODO: refactor to use CalloutBanner component
|
12 |
| -function ContributorsQuizBanner(props: React.HTMLAttributes<HTMLDivElement>) { |
| 10 | +function ContributorsQuizBanner({ |
| 11 | + className, |
| 12 | + ...props |
| 13 | +}: React.HTMLAttributes<HTMLDivElement>) { |
13 | 14 | return (
|
14 | 15 | <aside
|
15 | 16 | className={cn(
|
16 | 17 | "flex flex-col rounded md:flex-row",
|
17 |
| - "bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20" |
| 18 | + "bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20", |
| 19 | + className |
18 | 20 | )}
|
19 | 21 | {...props}
|
20 | 22 | >
|
21 | 23 | <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 }} |
| 24 | + className={cn( |
| 25 | + "relative flex-[1_1_50%]", |
| 26 | + "justify-center md:justify-end", |
| 27 | + "items-end", |
| 28 | + "md:min-h-auto min-h-[200px]", |
| 29 | + "px-8 md:px-0" |
| 30 | + )} |
28 | 31 | >
|
29 |
| - <Image |
30 |
| - position="absolute" |
| 32 | + <TwImage |
| 33 | + className="absolute max-h-[120%] w-full object-contain" |
31 | 34 | src={PeopleLearning}
|
32 | 35 | alt="People learning about Ethereum"
|
33 |
| - w="full" |
34 |
| - maxH="120%" |
35 |
| - style={{ |
36 |
| - objectFit: "contain", |
37 |
| - }} |
38 | 36 | />
|
39 |
| - <Box hideFrom="md" borderBottom="1px solid #D3C5F1" w="full" /> |
| 37 | + <div className="w-full border-b border-[#D3C5F1] md:hidden" /> |
40 | 38 | </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 }} |
| 39 | + <Stack |
| 40 | + className={cn("flex-[1_1_50%]", "gap-8 py-8 ps-8", "pe-8 lg:pe-0")} |
48 | 41 | >
|
49 |
| - <Flex gap="2" flexDir="column"> |
50 |
| - <Heading size="lg">Unsure where to start?</Heading> |
51 |
| - <Text size="lg" color="body.base"> |
| 42 | + <Stack> |
| 43 | + <h2>Unsure where to start?</h2> |
| 44 | + <p className="text-lg text-body"> |
52 | 45 | Take a quick quiz and find out how you can contribute on
|
53 | 46 | ethereum.org.
|
54 |
| - </Text> |
55 |
| - </Flex> |
56 |
| - <Box> |
| 47 | + </p> |
| 48 | + </Stack> |
| 49 | + <div> |
57 | 50 | <ButtonLink href="https://ethdotorg.typeform.com/contributor">
|
58 | 51 | Take a quiz
|
59 | 52 | </ButtonLink>
|
60 |
| - </Box> |
61 |
| - </Flex> |
| 53 | + </div> |
| 54 | + </Stack> |
62 | 55 | </aside>
|
63 | 56 | )
|
64 | 57 | }
|
|
0 commit comments