diff --git a/src/components/homepage/FAQAccordion.svelte b/src/components/homepage/FAQAccordion.svelte index 5fa9f38..34422f5 100644 --- a/src/components/homepage/FAQAccordion.svelte +++ b/src/components/homepage/FAQAccordion.svelte @@ -1,26 +1,47 @@ - +
{#each entries as entry, index} - - toggleItem(index)} + class="flex w-full bg-ecsess-600/20 items-center gap-3 px-3 py-2 text-left text-lg font-bold hover:bg-ecsess-500/40 transition-colors duration-200 {isOpen(index) + ? 'rounded-t-md' + : 'rounded-md'}" > {entry.question} - + + > + - - + + - - {#snippet element(attributes)} - {#if !attributes.hidden} -
- {entry.answer} -
- {/if} - {/snippet} -
-
+ {#if isOpen(index)} +
+ {entry.answer} +
+ {/if} +
{/each} -
+