I'm currently designing a User Interface for a web application that allows users to have multiple projects open simultaneously. To achieve this, I decided to use an accordion as the logical component in the left navigation bar. The reason behind this choice is that users may or may not want to view the list of active projects at all times.
When the accordion is collapsed, everything looks neat and organized like this:
https://i.sstatic.net/dUAZj.png
However, when it expands, the Divider does not move down or resize the containing div as expected, resulting in this mess:
https://i.sstatic.net/dZ9du.png
You can see that the contents of the Accordion are displayed below the Divider. Another issue is that the AccordionSummary repositions itself while expanding, but I can address that later on.
I've set up a codesandbox with the basic UI framework. In the ProjectsTile.js and ProjectsTile.css files, I've included code for both the Material UI Accordion and my attempt at coding a custom Accordion from scratch. Unfortunately, neither solution successfully moved the other contents within the NavDrawer.js when expanding the Accordions. How can I ensure that the content below the ProjectsTile in the NavDrawer moves down when the Accordion expands and back up when it collapses?