- trop de trucs d'un coup... je vais faire attention ensuite ^^'

This commit is contained in:
Jérémy Guillot
2024-06-10 13:57:50 +02:00
parent 9595831aa3
commit c46e1a0a5c
69 changed files with 4004 additions and 385 deletions

View File

@@ -0,0 +1,24 @@
import {Controller} from '@hotwired/stimulus';
/*
* The following line makes this controller "lazy": it won't be downloaded until needed
* See https://github.com/symfony/stimulus-bridge#lazy-controllers
*/
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static targets = ['body']
// ...
collapse(event) {
if (this.bodyTarget.style.display === "none") {
this.bodyTarget.style.display = "block";
event.currentTarget.classList.remove('fa-chevron-up');
event.currentTarget.classList.add('fa-chevron-down');
} else {
this.bodyTarget.style.display = "none";
event.currentTarget.classList.remove('fa-chevron-down');
event.currentTarget.classList.add('fa-chevron-up');
}
}
}