Move all files to stimulus-esbuild/

This commit is contained in:
Oliver Davies 2025-09-29 22:53:27 +01:00
parent 4c850b3b40
commit 7588eb0c98
14 changed files with 0 additions and 0 deletions

View file

@ -1,45 +0,0 @@
import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
static targets = ["result"];
static values = {
canBeNegative: Boolean,
count: Number,
maximumCountNumber: Number,
};
connect() {
console.log("count#connect");
this.resultTarget.textContent = this.countValue;
}
countValueChanged() {
console.log("count#countValueChanged");
this.resultTarget.textContent = this.countValue;
}
decrement() {
console.log("count#decrement");
if (this.canBeNegativeValue === false && this.countValue === 0) {
return;
}
this.countValue = this.countValue - 1;
}
increment() {
console.log("count#increment");
const maximumCountNumber = this.maximumCountNumberValue || 10;
if (this.countValue === maximumCountNumber) {
return;
}
this.countValue = this.countValue + 1;
}
}