Hi, I’d like to use the class list object to add a class ‘inactiveSidebar’ to my sidebar. This will toggle off the sidebar once it is added in the classList.
I am using a separate component i.e header that has an block which has OnClick Logic to toggle the “isOpenSidebar” property between true and false.
I have added some ClassList logic to return the list of classes for the sidebar based on the current page data i.e whether the “isOpenSidebar” is true or false.
From the first image I see that ClassList should be an array of String. In the last image, I’m using a list object to return the list of classes. I can’t figure out why it hasn’t worked. Please advise.