formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
120 stars 4 forks source link

Compatibility Issue Between Preact and Reshaped #353

Open JasonTanz opened 2 weeks ago

JasonTanz commented 2 weeks ago

Describe the Bug
There is a compatibility issue between Preact and Reshaped, causing the <Accordion /> component to not function as expected.

To Reproduce

Steps to Reproduce

  1. Go to the Code Sandbox demo.
  2. Click to open the Accordion.
  3. Click again on "Click to show"; an "Underneath" text should appear.
  4. Observe the behavior:
    • Preact Demo: The "Underneath" text gets cut off.
    • React Demo: The "Underneath" text displays completely.

Expected Behavior
In the React demo, the accordion adjusts its height automatically to fit the content, with smooth animations for opening and closing. However, in the Preact demo, the accordion height becomes fixed and any additional dynamic content will get cut off, and the animation breaks, resulting in a "jumping" effect when opening the accordion instead of a smooth transition.

Screenshots

Environment (please complete the following information):