heroweb/poc/static/js/label-color.js
2024-09-02 07:28:06 +02:00

11 lines
373 B
JavaScript

var labels = document.querySelectorAll("label[checkbox-color-label]");
labels.forEach(label => {
label.addEventListener("click", function () {
let shapes = label.querySelectorAll("[checkbox-color]");
shapes.forEach(shape => {
shape.classList.toggle("fill-slate-800");
shape.classList.toggle("fill-white");
});
})
});