Skip to content

Commit

Permalink
refactor button into IconButton
Browse files Browse the repository at this point in the history
  • Loading branch information
TeemuKoivisto committed Apr 5, 2024
1 parent 1b13b0d commit 441dac9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/elements/IconButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</script>

<button
class={`${$$props.class || ''} flex items-center justify-center rounded p-1 hover:bg-gray-200`}
{...$$restProps}
class={`${$$props.class || ''} flex items-center justify-center rounded p-1 hover:bg-gray-200`}
on:click
>
<Icon {icon} width={size} />
Expand Down
4 changes: 1 addition & 3 deletions packages/client/src/routes/(site)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@
>
MIDI Note Trainer
<div class="flex items-center justify-center">
<button class="rounded p-2 hover:bg-gray-200" on:click={handleReset}>
<Icon icon={restore} width={24} />
</button>
<IconButton class="p-2" icon={restore} size={24} on:click={handleReset} />
</div>
</h1>

Expand Down

0 comments on commit 441dac9

Please sign in to comment.