heroweb/templatesrcpoc/assets/js/label-color.js

11 lines
373 B
JavaScript
Raw Normal View History

2024-09-02 06:01:44 +00:00
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");
});
})
});