@@ -30,13 +30,13 @@ const hashCode = (stringPhrase: string): number => {
30
30
31
31
// Theme variables from Theme.js
32
32
const colors = [
33
- "#ffe78e" ,
34
- "#ef7d7d" ,
35
- "#a7d0f4" ,
36
- "#6fc4a0" ,
37
- "#ffe3d3" ,
38
- "#ffa1c3" ,
39
- "#a4a4ff" ,
33
+ "bg-[ #ffe78e] " ,
34
+ "bg-[ #ef7d7d] " ,
35
+ "bg-[ #a7d0f4] " ,
36
+ "bg-[ #6fc4a0] " ,
37
+ "bg-[ #ffe3d3] " ,
38
+ "bg-[ #ffa1c3] " ,
39
+ "bg-[ #a4a4ff] " ,
40
40
]
41
41
42
42
const BoxGrid = ( { items } : BoxGridProps ) => {
@@ -52,22 +52,16 @@ const BoxGrid = ({ items }: BoxGridProps) => {
52
52
const colorIdx = hashCode ( item . emoji ) % colors . length
53
53
const color = colors [ colorIdx ]
54
54
const isOpen = idx === indexOpen
55
+ const columnNumberClassName = `col-start-${ columnNumber } `
55
56
56
57
return (
57
58
< Flex
58
59
className = { cn (
59
60
"cursor-pointer items-center justify-between border border-body p-6 transition-transform duration-500 hover:-skew-x-6 hover:shadow-table-box-hover lg:items-stretch" ,
60
61
isOpen
61
- ? [
62
- "flex-col text-gray-600 sm:flex-col lg:row-start-1 lg:row-end-3 lg:flex-col" ,
63
- columnNumber === 1 && "lg:col-start-1" ,
64
- columnNumber === 2 && "lg:col-start-2" ,
65
- columnNumber === 3 && "lg:col-start-3" ,
66
- columnNumber === 4 && "lg:col-start-4" ,
67
- ]
62
+ ? `flex-col text-gray-600 sm:flex-col lg:row-start-1 lg:row-end-3 lg:flex-col ${ color } lg:${ columnNumberClassName } `
68
63
: "flex-col-reverse bg-background text-body hover:bg-background-highlight sm:flex-row-reverse lg:flex-col-reverse"
69
64
) }
70
- style = { { backgroundColor : isOpen ? color : "" } }
71
65
onClick = { ( ) => {
72
66
setOpenIndex ( idx )
73
67
trackCustomEvent ( {
@@ -88,9 +82,11 @@ const BoxGrid = ({ items }: BoxGridProps) => {
88
82
text = { item . emoji }
89
83
/>
90
84
< div >
91
- < h3 className = "mb-8 mt-0 leading-xs" > { item . title } </ h3 >
85
+ < h3 className = "mb-8 mt-0 text-[2.5rem] font-normal leading-xs" >
86
+ { item . title }
87
+ </ h3 >
92
88
{ isOpen && (
93
- < p className = "mb-6 leading-xs text-gray-600" >
89
+ < p className = "mb-6 text-xl leading-xs text-gray-600" >
94
90
{ item . description }
95
91
</ p >
96
92
) }
0 commit comments