Accordion in nuxt-content
I want to create accordion component for nuxt-content markdown. I thought it would use NuxtUI Accordion (https://ui.nuxt.com/components/accordion) I would like every H2 to be turned into a title in accordion and the rest of the content to be hidden to make markdown look normal, like here:
Or if it is possible to create multiple slots simultaneously:
But I don't know how to get to the slots in the normal way, I tried:
but
Or if its not worth doing - can I use slots like this?
Accordion.vue:
Or if it is possible to create multiple slots simultaneously:
But I don't know how to get to the slots in the normal way, I tried:
but
MDCSlot runs the entire $slots.default, and using the same slot name makes it rendered one at a timeOr if its not worth doing - can I use slots like this?
Accordion.vue:
<UAccordion :items="items" />