wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates
This commit is contained in:
@@ -9,26 +9,30 @@ function set(v: number): void {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="inline-flex overflow-hidden rounded-md border border-border">
|
||||
<div class="border-border inline-flex overflow-hidden rounded-md border">
|
||||
<button
|
||||
type="button"
|
||||
class="h-8 w-[30px] border-0 bg-bg text-sm transition-colors hover:text-primary disabled:cursor-not-allowed disabled:opacity-40"
|
||||
class="bg-bg hover:text-primary h-8 w-[30px] border-0 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40"
|
||||
:disabled="modelValue <= 1"
|
||||
@click="set(modelValue - 1)"
|
||||
>−</button>
|
||||
>
|
||||
−
|
||||
</button>
|
||||
<input
|
||||
:value="modelValue"
|
||||
type="number"
|
||||
:min="1"
|
||||
:max="max"
|
||||
class="h-8 w-12 [appearance:textfield] border-x border-border bg-surface text-center text-[13px] text-text outline-none focus:border-primary"
|
||||
class="border-border bg-surface text-text focus:border-primary h-8 w-12 [appearance:textfield] border-x text-center text-[13px] outline-none"
|
||||
@change="set(Number(($event.target as HTMLInputElement).value))"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="h-8 w-[30px] border-0 bg-bg text-sm transition-colors hover:text-primary disabled:cursor-not-allowed disabled:opacity-40"
|
||||
class="bg-bg hover:text-primary h-8 w-[30px] border-0 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40"
|
||||
:disabled="modelValue >= max"
|
||||
@click="set(modelValue + 1)"
|
||||
>+</button>
|
||||
>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user