Skip to content

Commit

Permalink
fix: switch to snippet instead of slot for IconButton
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreminger committed Dec 15, 2024
1 parent 472b0d3 commit 3267a32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/IconButton.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import { modifierKey } from './stores';
interface Props {
Expand All @@ -8,6 +9,7 @@
statusDot?: boolean;
noTouch?: boolean;
click?: () => void;
children: Snippet;
}
let {
Expand All @@ -16,7 +18,8 @@
id = "",
statusDot = false,
noTouch = false,
click
click,
children
}: Props = $props();
let currentTitle = $derived(statusDot && Boolean(statusDotTitle) ? statusDotTitle : title);;
Expand Down Expand Up @@ -90,7 +93,7 @@
class:statusDot
>
<div class="icon">
<slot></slot>
{@render children()}
</div>
{#if statusDot}
<div class="dot"></div>
Expand Down

0 comments on commit 3267a32

Please sign in to comment.