Currently, I am in the process of constructing an accordion that consists of multiple children and showcases an open/close icon upon clicking.
The concern I am facing revolves around the behavior of the icons. Everything works smoothly when expanding and collapsing one item at a time. However, problems arise when attempting to open multiple items simultaneously as the icons start behaving strangely, displaying minuses instead of pluses.
I have tried implementing various if-else statements, but unfortunately, I have not had any success thus far.
In case you want to take a look, I have included a link to my CodePen