Skip to content

Commit

Permalink
fix: tooltip and copy button in text
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jul 4, 2023
1 parent f98c199 commit 30b041e
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions frontend/src/lib/components/apps/components/display/AppText.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,25 @@
)}
>
{String(result)}
{#if resolvedConfig.tooltip && resolvedConfig.tooltip != ''}
<Tooltip>{resolvedConfig.tooltip}</Tooltip>
{/if}
{#if resolvedConfig.copyButton && result}
<Popover notClickable>
<Button
variant="border"
size="xs"
color="dark"
btnClasses="!p-1"
on:click={() => copyToClipboard(result)}
>
<Clipboard size={14} strokeWidth={2} />
</Button>
<svelte:fragment slot="text">Copy to clipboard</svelte:fragment>
</Popover>
{/if}
</svelte:element>

{#if resolvedConfig.tooltip && resolvedConfig.tooltip != ''}
<Tooltip>{resolvedConfig.tooltip}</Tooltip>
{/if}
{#if resolvedConfig.copyButton && result}
<div class="flex">
<Button
title="Copy to clipboard"
variant="border"
size="xs"
color="light"
btnClasses="!p-1"
on:click={() => copyToClipboard(result)}
>
<Clipboard size={14} strokeWidth={2} />
</Button>
</div>
{/if}
</div>
{/if}
</AlignWrapper>
Expand Down

0 comments on commit 30b041e

Please sign in to comment.