Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import React, { FC } from 'react';
const styles = require('./ProductFAQ.module.css');
export const ProductFAQ: FC<{
faq?: { question: string, answer: string }[];
}> = ({ faq }) => {
return faq && faq.length ?
<div className={`${styles.FAQ} ${styles.twoColumns}`}>
{faq.map((item, index) => (
<div className={styles.FAQItem} key={index}>
<h3 className={styles.FAQQuestion}>{index + 1}. {item.question}</h3>
<p className={styles.FAQAnswer}>{item.answer}</p>
</div>
)
)}
</div> : null;
}; |