Skip to content

Commit

Permalink
Interaction cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Apr 1, 2024
1 parent 0dc0e19 commit 384399c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/common/InputText.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export let value = "";
</script>

<input type="text" {name} {placeholder} bind:value />
<input type="text" {name} {placeholder} bind:value on:change />

<style>
input {
Expand All @@ -13,6 +13,7 @@
justify-content: center;
align-items: center;
gap: 0.5rem;
width: 100%;
border-radius: 0.5rem;
border: 1px solid var(--gray-3, hwb(205 60% 30%));
Expand Down
6 changes: 5 additions & 1 deletion src/lib/components/common/Switch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
</script>

<div class="switch" class:disabled>
<button {disabled} role="switch" aria-checked={checked} on:click={handleClick}
<button
{disabled}
role="switch"
aria-checked={checked}
on:click|preventDefault={handleClick}
></button>
<input {name} type="checkbox" bind:checked class="hidden" />
</div>
Expand Down

0 comments on commit 384399c

Please sign in to comment.