Skip to content

Commit

Permalink
style: gray out and disable login button when name is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
awwpotato committed Dec 10, 2024
1 parent 56fd1b7 commit bb63470
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
placeholder="Please enter your name here"
bind:value={inputname}
/>
{#if inputname != ''}
<button
class="text-l bg-grey rounded border-2 border-solid px-4 py-2 text-center text-white"
on:click={login}
>
Login
</button>
{/if}
<button
class="text-l rounded bg-gunmetal px-4 py-2 text-center
{inputname === '' ? 'pointer-events-none text-white/50' : ''}"
on:click={login}
>
Login
</button>
</div>
</div>

0 comments on commit bb63470

Please sign in to comment.