(tab)
| 2578 | const uiExamplesPageByTab = { tft: 0, oled: 0 }; // 0-based |
| 2579 | |
| 2580 | function setUiExamplesTab(tab) { |
| 2581 | uiExamplesActiveTab = tab === "oled" ? "oled" : "tft"; |
| 2582 | if (uiExamplesTabTft) { |
| 2583 | const active = uiExamplesActiveTab === "tft"; |
| 2584 | uiExamplesTabTft.classList.toggle("active", active); |
| 2585 | uiExamplesTabTft.setAttribute("aria-selected", active ? "true" : "false"); |
| 2586 | } |
| 2587 | if (uiExamplesTabOled) { |
| 2588 | const active = uiExamplesActiveTab === "oled"; |
| 2589 | uiExamplesTabOled.classList.toggle("active", active); |
| 2590 | uiExamplesTabOled.setAttribute("aria-selected", active ? "true" : "false"); |
| 2591 | } |
| 2592 | renderUiExamples(); |
| 2593 | } |
| 2594 | |
| 2595 | function renderUiExamples() { |
| 2596 | if (!uiExamplesList) return; |
no test coverage detected