When creating an amp template, I included a button that toggles the visibility of an amp-sidebar. The code for the button is as follows:
<button class="button .closed icon" on='tap:sidebar1.toggle'></button>
The side-bar toggles successfully. However, I'd like to have the icon displayed change based on the state (open or closed).
For this purpose, I have defined two classes:
button .closed (hamburger menu icon)
button .open (cross)
The shared class "icon" will remain consistent between the two states. Additionally, the 'tap:sidebar1.toggle' functionality is essential for the menu to toggle.