┌─ ASTRO ────────────────────────────────────────────────────────────────────┐│ --- ││ // Native <details> with ASCII chrome. Renders once - the [+] marker ││ // and left rail are width-independent, so no dual-render is needed and ││ // open state survives viewport changes. ││ import type { Props } from "./Accordion"; ││ import "./Accordion.scss"; ││ ││ const { label, open = false } = Astro.props as Props; ││ --- ││ <details class="accordion" open={open}> ││ <summary class="acc-summary">{label}</summary> ││ <div class="acc-body"><slot /></div> ││ </details> │└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ASTRO ──────────────────────────────┐│ --- ││ // Native <details> with ASCII chrome. Rende ││ rs once - the [+] marker ││ // and left rail are width-independent, so n ││ o dual-render is needed and ││ // open state survives viewport changes. ││ import type { Props } from "./Accordion"; ││ import "./Accordion.scss"; ││ ││ const { label, open = false } = Astro.props ││ as Props; ││ --- ││ <details class="accordion" open={open}> ││ <summary class="acc-summary">{label}</summ ││ ary> ││ <div class="acc-body"><slot /></div> ││ </details> │└──────────────────────────────────────────────┘