diff options
| author | Adam Soltys <[email protected]> | 2024-11-01 14:45:04 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-01 14:45:06 -0700 |
| commit | ba185fae48a70d49521b6e0cb4371b126f295022 (patch) | |
| tree | a188f7dddc8dd64f06d7ed3ef50023955720c9d8 /src/routes/(app)/invoice | |
| parent | d7fd16243c7c6f6260cc2958abc0cb60f50deef9 (diff) | |
| download | coinos-ui-ba185fae48a70d49521b6e0cb4371b126f295022.tar.gz coinos-ui-ba185fae48a70d49521b6e0cb4371b126f295022.zip | |
focus start button
Diffstat (limited to 'src/routes/(app)/invoice')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.svelte | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/routes/(app)/invoice/[id]/tip/+page.svelte b/src/routes/(app)/invoice/[id]/tip/+page.svelte index da2d041e..217b8474 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.svelte +++ b/src/routes/(app)/invoice/[id]/tip/+page.svelte @@ -153,12 +153,21 @@ <button type="button" on:click={() => (tipPercent = 0)}>Reset</button> </div> {:else} - {#each tipAmounts as amount} - <button - type="button" - class:active={active(amount, tipPercent)} - on:click={() => handleTipButtonClick(amount)}>{amount}</button - > + {#each tipAmounts as amount, i} + {#if i === 0} + <button + use:focus + type="button" + class:active={active(amount, tipPercent)} + on:click={() => handleTipButtonClick(amount)}>{amount}</button + > + {:else} + <button + type="button" + class:active={active(amount, tipPercent)} + on:click={() => handleTipButtonClick(amount)}>{amount}</button + > + {/if} {/each} {/if} |
