feat: slider-input - units editor

This commit is contained in:
Azgaar 2024-08-20 23:15:19 +02:00
parent bba23c6fc7
commit 292b2820e8
8 changed files with 62 additions and 143 deletions

View file

@ -24,13 +24,11 @@
constructor() {
super();
this.appendChild(template.content.cloneNode(true));
}
connectedCallback() {
const range = this.querySelector("input[type=range]");
const number = this.querySelector("input[type=number]");
range.value = number.value = this.getAttribute("value") || 50;
range.value = number.value = this.value || this.getAttribute("value") || 50;
range.min = number.min = this.getAttribute("min") || 0;
range.max = number.max = this.getAttribute("max") || 100;
range.step = number.step = this.getAttribute("step") || 1;