feat: use new number input
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m2s

fix missing id in html
This commit is contained in:
Felix Hungenberg
2026-01-20 16:49:56 +01:00
parent 3e3d41ae98
commit 6b6038e546
3 changed files with 33 additions and 25 deletions

View File

@@ -112,23 +112,25 @@
onmousedown={handleMouseDown}
onmouseup={handleMouseUp}
>
<div class="">
<button onclick={() => handleChange(-step)}>-</button>
<input
bind:value
bind:this={inputEl}
{id}
{step}
{max}
{min}
type="number"
style={`width:${width};`}
/>
<button onclick={() => handleChange(+step)}>+</button>
</div>
{#if typeof min !== 'undefined' && typeof max !== 'undefined'}
<span class="overlay" style={`width: ${Math.min((value - min) / (max - min), 1) * 100}%`}
></span>
{/if}
<button onclick={() => handleChange(-step)}>-</button>
<input
bind:value
bind:this={inputEl}
{id}
{step}
{max}
{min}
type="number"
style={`width:${width};`}
/>
<button onclick={() => handleChange(+step)}>+</button>
</div>
<style>