Description
When running the docs locally (npm run dev), the homepage crashes with a Next.js hydration error. The issue comes from the DisclosureTrigger component inside components/core/disclosure.tsx.
The component clones its children and injects button-like props. If the user passes a <button> as the child, this results in nested <button> markup, which is invalid HTML and breaks hydration.
Error Message
Next.js shows the following error:
Steps to Reproduce
- Clone the repository
- Run
npm install
- Run
npm run dev
- Open
http://localhost:3000
- The hydration error appears immediately due to nested
<button> markup