Done V1
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user