File tree Expand file tree Collapse file tree 4 files changed +36
-30
lines changed
Expand file tree Collapse file tree 4 files changed +36
-30
lines changed Original file line number Diff line number Diff line change 11---
2- const {title, description, id} = Astro . props ;
3- console . log ( " index " , id )
2+ import downIcon from " ../../public/icons/downIcon.svg?raw " ;
3+ const { title, description, id } = Astro . props ;
44---
5- <div x-data =" {
5+ <div
6+ x-data =" {
67 visible: false,
78 toggle() {
89 this.visible = !this.visible
910 }
1011 }"
11-
12- class:list ={ [
13- " bg-white py-6 transition-all duration-300 ease-in-out overflow-hidden" ,
14- { " border-b-0" : id === null },
15- { " border-b-2" : id },
16- ]} >
17-
18- <div @click =" toggle()" class =" text-lg font-semibold cursor-pointer" >
12+ class:list ={ [
13+ " bg-white py-6 transition-all duration-300 ease-in-out overflow-hidden" ,
14+ { " border-b-0" : id === null },
15+ { " border-b-2" : id },
16+ ]}
17+ >
18+ <div
19+ @click =" toggle()"
20+ class =" flex flex-row items-center text-lg font-semibold cursor-pointer"
21+ >
22+ <div class =" w-[95%] px-4" >
1923 { title }
2024 </div >
21-
22- <div
23- x-transition
24- class =" transition-all duration-300 ease-in-out overflow-hidden"
25- :class =" visible ? 'max-h-40 opacity-100' : 'max-h-0 opacity-0'"
26-
25+ <div
26+ x-transition
27+ class =" w-fit"
28+ :class =" visible ? 'transform rotate-180 transition-transform duration-400' : 'transform rotate-0 transition-transform duration-400'"
2729 >
28- <p class =" text-gray-600 mt-2 overflow-hidden" >
29- { description }
30- </p >
30+ <Fragment set:html ={ downIcon } />
3131 </div >
3232 </div >
33+
34+ <div
35+ x-transition
36+ class =" transition-all duration-300 ease-in-out overflow-hidden"
37+ :class =" visible ? 'max-h-72 opacity-100' : 'max-h-0 opacity-0'"
38+ >
39+ <p class =" w-[90%] text-gray-600 mt-2 px-4 overflow-hidden" >
40+ { description }
41+ </p >
42+ </div >
43+ </div >
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import Accordion from "./Accordion.astro";
99 <div class =" container faqs-container mx-auto shadow-md p-6 pt-0" >
1010 {
1111 commonQuestions .map ((question , index ) => (
12- <Accordion { ... question } id = { index ++ < commonQuestions .length - 1 ? index ++ : null } />
12+ <Accordion
13+ { ... question }
14+ id = { index ++ < commonQuestions .length - 1 ? index ++ : null }
15+ />
1316 ))
1417 }
1518 </div >
Original file line number Diff line number Diff line change 3636 svg {
3737 @apply text-sm;
3838 }
39-
40- /* FAQ collapsibles style */
41- summary {
42- list-style : none; /* Elimina el marcador predeterminado */
43- }
44-
45- summary ::-webkit-details-marker {
46- display : none; /* Para navegadores basados en Webkit (Chrome, Safari) */
47- }
4839}
You can’t perform that action at this time.
0 commit comments