1
1
import { useTranslation } from "next-i18next"
2
- import { Flex } from "@chakra-ui/react"
3
2
4
3
import type { TranslationKey } from "@/lib/types"
5
4
6
- import { Image , type ImageProps } from "@/components/Image"
7
- import OldHeading from "@/components/OldHeading"
8
- import Text from "@/components/OldText"
5
+ import { type ImageProps , TwImage } from "@/components/Image"
9
6
10
7
import { cn } from "@/lib/utils/cn"
11
8
@@ -24,6 +21,7 @@ const CalloutBanner = ({
24
21
descriptionKey,
25
22
alt,
26
23
children,
24
+ className,
27
25
...props
28
26
} : CalloutBannerProps ) => {
29
27
const { t } = useTranslation ( "page-staking" )
@@ -32,47 +30,29 @@ const CalloutBanner = ({
32
30
< aside
33
31
className = { cn (
34
32
"flex flex-col rounded p-8 sm:p-12 lg:flex-row-reverse" ,
35
- "bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
33
+ "bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20" ,
34
+ className
36
35
) }
37
36
{ ...props }
38
37
>
39
- { image && (
40
- < Flex >
41
- < Image
42
- src = { image }
43
- alt = { alt }
44
- width = { imageWidth }
45
- style = { {
46
- objectFit : "contain" ,
47
- } }
48
- mx = "auto"
49
- mt = { - 24 }
50
- mb = { { base : 0 , lg : - 24 } }
51
- />
52
- </ Flex >
53
- ) }
54
- < Flex
55
- flexGrow = { 1 }
56
- flexShrink = { 0 }
57
- flexBasis = "50%"
58
- direction = "column"
59
- justifyContent = "center"
60
- ps = { { base : 0 , sm : 4 , lg : 8 } }
61
- w = { { base : "full" , lg : "inherit" } }
62
- >
63
- < OldHeading
64
- as = "h2"
65
- mt = { 0 }
66
- fontSize = { { base : "2xl" , sm : "2rem" } }
67
- lineHeight = "1.4"
68
- >
38
+ < div className = "flex" >
39
+ < TwImage
40
+ src = { image }
41
+ alt = { alt }
42
+ width = { imageWidth }
43
+ className = "-my-24 mx-auto object-contain max-lg:mb-0"
44
+ />
45
+ </ div >
46
+
47
+ < div className = "flex w-full flex-shrink-0 flex-grow basis-1/2 flex-col justify-center sm:ps-4 lg:w-[inherit] lg:ps-8" >
48
+ < h2 className = "mb-8 text-2xl leading-xs sm:text-[2rem]" >
69
49
{ t ( titleKey ) }
70
- </ OldHeading >
71
- < Text fontSize = "xl" w = " 90%" lineHeight = "140%" mb = { 8 } color = "text200 ">
50
+ </ h2 >
51
+ < p className = "mb-8 w-[ 90%] text-xl text-body-medium ">
72
52
{ t ( descriptionKey ) }
73
- </ Text >
53
+ </ p >
74
54
{ children }
75
- </ Flex >
55
+ </ div >
76
56
</ aside >
77
57
)
78
58
}
0 commit comments