fix: chevron SVG usa width/height e transform inline invece di classi Tailwind
This commit is contained in:
@@ -376,7 +376,8 @@ class LLMMonitorApp {
|
|||||||
onclick="app.toggleAccordion('${contentId}', this)"
|
onclick="app.toggleAccordion('${contentId}', this)"
|
||||||
aria-expanded="${isFirst}">
|
aria-expanded="${isFirst}">
|
||||||
<span class="font-semibold text-sm text-gray-200">${label}</span>
|
<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">
|
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"/>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -495,7 +496,9 @@ class LLMMonitorApp {
|
|||||||
const isHidden = content.classList.contains("hidden");
|
const isHidden = content.classList.contains("hidden");
|
||||||
content.classList.toggle("hidden", !isHidden);
|
content.classList.toggle("hidden", !isHidden);
|
||||||
const chevron = btn.querySelector(".accordion-chevron");
|
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));
|
btn.setAttribute("aria-expanded", String(isHidden));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user