Hi,I am trying to apply day and night theme to my popups on click of btn. For example if day theme btn is clicked popup should appear in day theme and for night theme same popup should appear with night theme.
I am using
You can switch the themes dynamically at runtime with something like this.
btn.addEventListener("click", () => { if (theme === "light") { sheet.href = "https://js.arcgis.com/4.22/esri/themes/dark/main.css"; theme = "dark"; } else if (theme === "dark") { sheet.href = "https://js.arcgis.com/4.22/esri/themes/light/main.css"; theme = "light"; } });
Here is a demo
https://codepen.io/odoe/pen/oNoQZNW?editors=1000
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.