@@ -15,7 +15,7 @@ import {
15
15
Button ,
16
16
Fade ,
17
17
Heading ,
18
- Text as ChakraText ,
18
+ Text ,
19
19
} from "@chakra-ui/react"
20
20
21
21
export interface IProps {
@@ -70,69 +70,66 @@ const ExpandableCard: React.FC<IProps> = ({
70
70
index = { isVisible ? [ 0 ] : [ ] }
71
71
>
72
72
< AccordionItem borderTopWidth = "0" flex = "1" >
73
- < AccordionButton
74
- width = "100%"
75
- padding = { `1.5rem 1.5rem ${ isVisible ? "0" : "1.5rem" } ` }
76
- flex = "1"
77
- onClick = { onClick }
78
- _hover = { {
79
- backgroundColor : "ednBackground" ,
80
- } }
81
- >
82
- < Box
83
- display = "flex"
73
+ < h3 style = { { margin : 0 } } >
74
+ < AccordionButton
84
75
width = "100%"
85
- alignItems = "center"
86
- flexDir = { { base : "column" , sm : "row" } }
76
+ padding = { `1.5rem 1.5rem ${ isVisible ? "0" : "1.5rem" } ` }
77
+ flex = "1"
78
+ onClick = { onClick }
79
+ _hover = { {
80
+ backgroundColor : "ednBackground" ,
81
+ } }
87
82
>
88
83
< Box
89
- marginBottom = { { base : "0.5rem" , sm : 0 } }
90
- marginRight = { { base : 0 , sm : "1rem" } }
84
+ display = "flex"
85
+ width = "100%"
86
+ alignItems = "center"
87
+ flexDir = { { base : "column" , sm : "row" } }
91
88
>
92
89
< Box
93
- display = "flex"
94
- alignItems = "center"
95
- sx = { {
96
- svg : { marginRight : "1.5rem" } ,
97
- } }
98
- margin = "1rem 0"
90
+ marginBottom = { { base : "0.5rem" , sm : 0 } }
91
+ marginRight = { { base : 0 , sm : "1rem" } }
99
92
>
100
- { ! ! Svg && < Svg /> }
101
- < Heading
102
- as = "h3"
103
- size = "md"
104
- fontWeight = "semibold"
105
- flex = "1"
106
- marginTop = "0rem"
107
- marginBottom = "0.5rem"
93
+ < Box
94
+ display = "flex"
95
+ alignItems = "center"
96
+ sx = { {
97
+ svg : { marginRight : "1.5rem" } ,
98
+ } }
99
+ margin = "1rem 0"
108
100
>
109
- { title }
110
- </ Heading >
101
+ { ! ! Svg && < Svg /> }
102
+ < Text
103
+ fontSize = "xl"
104
+ fontWeight = "semibold"
105
+ flex = "1"
106
+ marginTop = "0rem"
107
+ marginBottom = "0.5rem"
108
+ >
109
+ { title }
110
+ </ Text >
111
+ </ Box >
112
+ < Text
113
+ fontSize = "sm"
114
+ color = "text200"
115
+ marginBottom = "0"
116
+ width = "fit-content"
117
+ >
118
+ { contentPreview }
119
+ </ Text >
111
120
</ Box >
112
- < ChakraText
113
- fontSize = "sm"
114
- color = "text200"
115
- marginBottom = "0"
116
- width = "fit-content"
121
+ < Text
122
+ fontSize = "md"
123
+ color = "primary"
124
+ ml = { { base : undefined , sm : "auto" } }
125
+ mt = "auto"
126
+ mb = "auto"
117
127
>
118
- { contentPreview }
119
- </ ChakraText >
128
+ < Translation id = { isVisible ? "less" : "more" } />
129
+ </ Text >
120
130
</ Box >
121
- < Button
122
- as = "div" // we do not want to nest a button in a button
123
- ml = { { base : undefined , sm : "auto" } }
124
- onClick = { onClick }
125
- variant = "link"
126
- color = "primary"
127
- _hover = { {
128
- boxShadow : "none" ,
129
- textDecoration : "none" ,
130
- } }
131
- >
132
- < Translation id = { isVisible ? "less" : "more" } />
133
- </ Button >
134
- </ Box >
135
- </ AccordionButton >
131
+ </ AccordionButton >
132
+ </ h3 >
136
133
< AccordionPanel
137
134
paddingX = "1.5rem"
138
135
paddingBottom = "1.5rem"
0 commit comments