fix(accordion): place children inside content div and add group wrapper

Children were appended to the outer <details> element instead of inside
the .accordion-content div, causing text to render outside the accordion
box. Also adds .accordion-group wrapper to eliminate parent gap between
stacked items, and styles content with smaller font and muted color.
This commit is contained in:
Florian Schroedl
2026-03-03 17:12:29 +01:00
parent 0dd8a9c8bf
commit 1b4929224b
7 changed files with 38 additions and 27 deletions

View File

@@ -85,9 +85,10 @@
;; ── Accordion ───────────────────────────────────────────────────────
(defn accordion-demo []
(section "Accordion"
(accordion/accordion {:title "What is this framework?"} "A cross-target component library.")
(accordion/accordion {:title "How do I use it?" :open true} "Just require the namespace and call functions.")
(accordion/accordion {:title "Is it accessible?"} "Yes, follows ARIA best practices.")))
[:div {:class "accordion-group"}
(accordion/accordion {:title "What is this framework?"} "A cross-target component library.")
(accordion/accordion {:title "How do I use it?" :open true} "Just require the namespace and call functions.")
(accordion/accordion {:title "Is it accessible?"} "Yes, follows ARIA best practices.")]))
;; ── Table ───────────────────────────────────────────────────────────
(defn table-demo []