Skip to content

Commit

Permalink
fix Copy_To_Clipboard for non-icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Aug 4, 2024
1 parent 64ebc10 commit 5f904ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-waves-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ryanatkn/fuz': patch
---

fix `Copy_To_Clipboard` for non-icons
11 changes: 2 additions & 9 deletions src/lib/Copy_To_Clipboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@
// TODO add library entry
const {
text,
classes = '',
button_classes = 'icon_button',
button_attrs,
attrs,
children,
}: Props = $props();
const {text, classes = '', button_classes, button_attrs, attrs, children}: Props = $props();
let copied = $state(false);
let failed = $state(false);
Expand All @@ -42,7 +35,7 @@
<button
{...button_attrs}
type="button"
class={button_classes}
class={button_classes ?? (children ? undefined : 'icon_button')}
style:font-size="var(--size_lg)"
onclick={copy}
>{#if children}{@render children(copied, failed)}{:else}📋{/if}</button
Expand Down

0 comments on commit 5f904ee

Please sign in to comment.