fix: Use right arrow position when collapsing sections (#746)

This commit is contained in:
Alessio Cappa
2026-01-23 00:24:29 +01:00
committed by GitHub
parent 7bd1058b6e
commit 262de20602
3 changed files with 6 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ export default class extends Controller {
collapse(persist = true) {
this.contentTarget.classList.add("hidden");
this.chevronTarget.classList.add("rotate-180");
this.chevronTarget.classList.add("-rotate-90");
this.collapsedValue = true;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "false");
@@ -45,7 +45,7 @@ export default class extends Controller {
expand() {
this.contentTarget.classList.remove("hidden");
this.chevronTarget.classList.remove("rotate-180");
this.chevronTarget.classList.remove("-rotate-90");
this.collapsedValue = false;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "true");

View File

@@ -33,7 +33,7 @@ export default class extends Controller {
collapse(persist = true) {
this.contentTarget.classList.add("hidden");
this.chevronTarget.classList.add("rotate-180");
this.chevronTarget.classList.add("-rotate-90");
this.collapsedValue = true;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "false");
@@ -45,7 +45,7 @@ export default class extends Controller {
expand() {
this.contentTarget.classList.remove("hidden");
this.chevronTarget.classList.remove("rotate-180");
this.chevronTarget.classList.remove("-rotate-90");
this.collapsedValue = false;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "true");

View File

@@ -33,7 +33,7 @@ export default class extends Controller {
collapse(persist = true) {
this.contentTarget.classList.add("hidden");
this.chevronTarget.classList.add("rotate-180");
this.chevronTarget.classList.add("-rotate-90");
this.collapsedValue = true;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "false");
@@ -45,7 +45,7 @@ export default class extends Controller {
expand() {
this.contentTarget.classList.remove("hidden");
this.chevronTarget.classList.remove("rotate-180");
this.chevronTarget.classList.remove("-rotate-90");
this.collapsedValue = false;
if (this.hasButtonTarget) {
this.buttonTarget.setAttribute("aria-expanded", "true");