Skip to content

Commit b1b941c

Browse files
fix: faq block and answers
1 parent 1bfde28 commit b1b941c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/components/faqs/faqs.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,20 @@ const FAQs: React.FC = () => {
9090
transition={{ duration: 0.3 }}
9191
>
9292
<button
93-
className={`accordion-toggle group flex justify-between items-center text-lg font-medium w-full transition-all duration-300
93+
className={`accordion-toggle group flex justify-between items-center text-lg font-semibold w-full transition-all duration-300
9494
${
9595
isDark
96-
? "text-gray-200 bg-gray-800 hover:text-indigo-400"
97-
: "text-gray-700 bg-gray-100 hover:text-indigo-600"
96+
? "text-gray-100 bg-gray-800 hover:bg-gray-700 hover:text-white border border-gray-700 hover:border-gray-600"
97+
: "text-gray-900 bg-white hover:bg-gray-50 hover:text-gray-900 border border-gray-200 hover:border-gray-300 shadow-sm"
9898
}
99-
p-4 rounded-lg focus:outline-none`}
99+
p-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
100100
onClick={() => toggleAccordion(index)}
101101
>
102-
{faq.question}
102+
<span className="text-left pr-4">{faq.question}</span>
103103
<motion.span
104-
className="transform transition-transform duration-300"
104+
className={`transform transition-transform duration-300 flex-shrink-0 ${
105+
isDark ? "text-gray-300" : "text-gray-600"
106+
}`}
105107
animate={{ rotate: activeIndex === index ? 180 : 0 }}
106108
>
107109
<FiChevronDown size={22} />
@@ -117,19 +119,21 @@ const FAQs: React.FC = () => {
117119
transition={{ duration: 0.3, ease: "easeInOut" }}
118120
>
119121
<div
120-
className={`mt-2 text-base transition-colors duration-200 ${
121-
isDark ? "text-gray-300" : "text-gray-900"
122+
className={`mt-3 p-5 text-base leading-relaxed transition-colors duration-200 rounded-lg border-l-4 ${
123+
isDark
124+
? "text-gray-100 bg-gradient-to-r from-gray-800/80 to-gray-900/60 border-l-indigo-400 shadow-lg"
125+
: "text-gray-900 bg-gradient-to-r from-white to-gray-50 border-l-indigo-500 shadow-md"
122126
}`}
123-
style={{
124-
color: isDark ? '#d1d5db' : '#111827'
125-
}}
126127
dangerouslySetInnerHTML={{
127128
__html: faq.answer.replace(
128129
/<strong>/g,
129-
`<strong style="color: ${isDark ? '#f3f4f6' : '#000000'}; font-weight: 600;">`
130+
`<strong style="color: ${isDark ? '#ffffff' : '#000000'}; font-weight: 700; background: ${isDark ? 'rgba(99, 102, 241, 0.2)' : 'rgba(199, 210, 254, 0.4)'}; padding: 2px 6px; border-radius: 4px;">`
130131
).replace(
131132
/<a /g,
132-
`<a style="color: ${isDark ? '#818cf8' : '#4f46e5'};" `
133+
`<a style="color: ${isDark ? '#c4b5fd' : '#3730a3'}; text-decoration: underline; font-weight: 600; transition: all 0.2s ease;" `
134+
).replace(
135+
/ /g,
136+
`<span style="color: ${isDark ? '#818cf8' : '#4f46e5'}; font-weight: bold;">•</span> `
133137
)
134138
}}
135139
/>

0 commit comments

Comments
 (0)