diff --git a/astro/src/components/web/subcomponents/QuestionList.tsx b/astro/src/components/web/subcomponents/QuestionList.tsx index 5b8271e..85bedc1 100644 --- a/astro/src/components/web/subcomponents/QuestionList.tsx +++ b/astro/src/components/web/subcomponents/QuestionList.tsx @@ -8,27 +8,30 @@ export function QuestionList(props: { questions: FrequentlyAskedQuestion[]; }) { }; return ( -
- { props.questions.map((question, index: number) => ( +
+ {props.questions.map((question, index: number) => (
toggle(index)} key={index} - className={`w-full overflow-hidden border-l border-r border-t ${open === index && "bg-amber-200"} ${index !== 0 && (index + 1 !== props.questions.length) && "border-amber-300"} ${index === 0 && "rounded-t-2xl border-t border-amber-300"} ${(index + 1) === props.questions.length && "rounded-b-2xl border-b border-amber-300 shadow-md"}`} + onClick={() => toggle(index)} + className={`w-full overflow-hidden border-l border-r border-t cursor-pointer ${open === index ? "bg-(--ptc) text-(--ptt)" : "bg-white"} ${index === 0 ? "rounded-t-2xl border-t border-(--ptc)" : ""} ${(index + 1) === props.questions.length ? "rounded-b-2xl border-b border-(--ptc) shadow-md" : "border-(--ptc)"}`} > -

{ question.question }

+

+ {question.question} +

+
-
+
{question.answer}
- )) } + ))}
- ) -} + ); +} \ No newline at end of file