@@ -5,6 +5,7 @@ import StartIcon from 'assets/images/launchpad/faq/start-icon.svg';
55import FeesIcon from 'assets/images/launchpad/faq/fees-eligibility-icon.svg' ;
66import SecurityIcon from 'assets/images/launchpad/faq/security-icon.svg' ;
77import TroubleIcon from 'assets/images/launchpad/faq/troubleshooting-icon.svg' ;
8+ import { ChevronDown , ChevronUp } from 'react-feather' ;
89
910interface FAQItem {
1011 question : string ;
@@ -24,34 +25,35 @@ const FAQItem: React.FC<FAQItem & { isOpen: boolean; toggle: () => void }> = ({
2425 isOpen,
2526 toggle,
2627} ) => (
27- < div >
28- < button
29- className = 'w-full text-left pl-3 pr-2 py-3 flex justify-between items-center border-t border-[#282D3D]'
30- onClick = { toggle }
31- >
28+ < Box >
29+ < button className = 'faq-item-button' onClick = { toggle } >
3230 < span className = 'text-base lg:text-lg leading-6 font-semibold' >
3331 { question }
3432 </ span >
33+ < ChevronDown
34+ size = '20'
35+ className = { `down-icon ${ isOpen && 'rotate-180' } ` }
36+ />
3537 { /* <ChevronDownIcon
3638 className={clsx({
3739 ['min-w-5 h-5 p-[2px] lg:p-0 transition-transform duration-300']: true,
3840 ['rotate-180']: isOpen,
3941 })}
4042 /> */ }
4143 </ button >
42- < div
43- className = { `overflow-hidden transition-all duration-300 ease-in-out ${
44- isOpen ? 'opacity-100 ' : 'max-h-0 opacity-0 '
44+ < Box
45+ className = { `cover-faq-item ${
46+ isOpen ? 'faq-item-open ' : 'faq-item-close '
4547 } `}
4648 >
47- < div className = 'p-4' >
49+ < Box style = { { padding : '16px' } } >
4850 < p
49- className = 'text-gray-300'
51+ style = { { color : '#D1D5DB' } }
5052 dangerouslySetInnerHTML = { { __html : answer } }
5153 > </ p >
52- </ div >
53- </ div >
54- </ div >
54+ </ Box >
55+ </ Box >
56+ </ Box >
5557) ;
5658
5759const FAQ : React . FC = ( ) => {
@@ -187,48 +189,62 @@ You should see a prompt from BlockPass saying, “If you have previously created
187189 < Typography className = 'title2' > Frequently Asked Questions</ Typography >
188190 </ Box >
189191 < Box className = 'cover-faq' >
190- < Box className = 'cover-faq-list' >
191- { faqList . map ( ( faq ) => (
192- < Box
193- className = { `faq ${ faq . id === tabActive && 'faq-selected' } ` }
194- key = { faq . id }
195- onClick = { ( ) => handleSelectTab ( faq . id ) }
196- >
192+ < Box className = 'flex-40' >
193+ < Box className = 'cover-faq-list' >
194+ { faqList . map ( ( faq ) => (
197195 < Box
198- className = { `cover-img ${ faq . id === tabActive &&
199- 'cover-img-selected' } `}
196+ className = { `faq ${ faq . id === tabActive && 'faq-selected' } ` }
197+ key = { faq . id }
198+ onClick = { ( ) => handleSelectTab ( faq . id ) }
200199 >
201- < img src = { faq . logo } alt = { faq . id } />
202- </ Box >
203- < Box >
204- < Typography className = 'faq-name' > { faq . name } </ Typography >
205- </ Box >
206- { tabActive === faq . id && (
207- < svg
208- width = '79'
209- height = '14'
210- viewBox = '0 0 79 14'
211- fill = 'none'
212- strokeWidth = '1.5'
213- stroke = 'currentColor'
214- className = 'faq-arrow'
215- xmlns = 'http://www.w3.org/2000/svg'
200+ < Box
201+ className = { `cover-img ${ faq . id === tabActive &&
202+ 'cover-img-selected' } `}
216203 >
217- < g >
218- < path
219- d = 'M1 7H78M78 7L72 1M78 7L72 13'
220- stroke = '#4d5d7994'
221- strokeWidth = '1.5'
222- strokeLinecap = 'round'
223- strokeLinejoin = 'round'
224- />
225- </ g >
226- </ svg >
227- ) }
228- </ Box >
229- ) ) }
204+ < img src = { faq . logo } alt = { faq . id } />
205+ </ Box >
206+ < Box >
207+ < Typography className = 'faq-name' > { faq . name } </ Typography >
208+ </ Box >
209+ { tabActive === faq . id && (
210+ < svg
211+ width = '79'
212+ height = '14'
213+ viewBox = '0 0 79 14'
214+ fill = 'none'
215+ strokeWidth = '1.5'
216+ stroke = 'currentColor'
217+ className = 'faq-arrow'
218+ xmlns = 'http://www.w3.org/2000/svg'
219+ >
220+ < g >
221+ < path
222+ d = 'M1 7H78M78 7L72 1M78 7L72 13'
223+ stroke = '#4d5d7994'
224+ strokeWidth = '1.5'
225+ strokeLinecap = 'round'
226+ strokeLinejoin = 'round'
227+ />
228+ </ g >
229+ </ svg >
230+ ) }
231+ </ Box >
232+ ) ) }
233+ </ Box >
234+ </ Box >
235+ < Box className = 'cover-faq-items' >
236+ { faqList
237+ . find ( ( faq ) => faq . id === tabActive )
238+ ?. faq ?. map ( ( item , index ) => (
239+ < FAQItem
240+ key = { index }
241+ question = { item . question }
242+ answer = { item . answer }
243+ isOpen = { openItems . includes ( index ) }
244+ toggle = { ( ) => toggleItem ( index ) }
245+ />
246+ ) ) }
230247 </ Box >
231- < Box className = 'cover-faq-items' > </ Box >
232248 </ Box >
233249 </ Box >
234250 ) ;
0 commit comments