This commit is contained in:
2025-09-06 12:25:18 +02:00
parent 985f6d9bf9
commit 6f55dedbaa
8 changed files with 212 additions and 25 deletions

View File

@@ -3,18 +3,24 @@
label: string;
plus: (label: string) => void;
minus: (label: string) => void;
showPlus?: boolean;
showMinus?: boolean;
[key: string]: unknown;
}
let { label, plus, minus }: Props = $props();
let { label, plus, minus, showPlus = true, showMinus = true }: Props = $props();
</script>
<div class="specialBtn flex w-min gap-2 text-2xl">
<button class="innerBtn" onclick={() => minus(label)}>-</button>
{#if showMinus}
<button class="innerBtn" onclick={() => minus(label)}>-</button>
{/if}
<div class="whitespace-nowrap">
{label}
</div>
<button class="innerBtn" onclick={() => plus(label)}>+</button>
{#if showPlus}
<button class="innerBtn" onclick={() => plus(label)}>+</button>
{/if}
</div>
<style>