mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
13 lines
307 B
JavaScript
13 lines
307 B
JavaScript
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {
|
|
static targets = ["content"];
|
|
|
|
toggle(event) {
|
|
const input = event.currentTarget;
|
|
this.contentTargets.forEach((t) => {
|
|
t.style.display = input.dataset.toggleShow === "true" ? "block" : "none";
|
|
});
|
|
}
|
|
}
|