I am trying to incorporate a side menu bar into my React application. I want it to be initially closed, only displaying icons, and then expand when clicking on one of the icons. However, I'm facing an issue where the side menu is not closing as intended. I have tried various methods but have been unable to make it work successfully.