fix: chevron SVG usa width/height e transform inline invece di classi Tailwind

This commit is contained in:
Luca Sacchi Ricciardi
2026-04-25 18:00:59 +02:00
parent 24b27d26ce
commit b6fba35004
+5 -2
View File
@@ -376,7 +376,8 @@ class LLMMonitorApp {
onclick="app.toggleAccordion('${contentId}', this)"
aria-expanded="${isFirst}">
<span class="font-semibold text-sm text-gray-200">${label}</span>
<svg class="accordion-chevron w-4 h-4 text-gray-400 transition-transform duration-200 ${isFirst ? "rotate-180" : ""}"
<svg class="accordion-chevron text-gray-400"
width="16" height="16" style="flex-shrink:0;transition:transform 0.2s;transform:${isFirst ? "rotate(180deg)" : "rotate(0deg)"}"
fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
</svg>
@@ -495,7 +496,9 @@ class LLMMonitorApp {
const isHidden = content.classList.contains("hidden");
content.classList.toggle("hidden", !isHidden);
const chevron = btn.querySelector(".accordion-chevron");
if (chevron) chevron.classList.toggle("rotate-180", isHidden);
if (chevron) {
chevron.style.transform = isHidden ? "rotate(180deg)" : "";
}
btn.setAttribute("aria-expanded", String(isHidden));
}