More clipboard write fixes, add utility function (#2286)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2022-10-06 15:38:47 +06:00
committed by GitHub
parent a0814a356f
commit d2a16ffd72
9 changed files with 30 additions and 21 deletions
@@ -14,6 +14,7 @@
-->
<script lang="ts">
import { Asset, IntlString } from '@hcengineering/platform'
import { copyTextToClipboard } from '@hcengineering/presentation'
import { Button } from '@hcengineering/ui'
export let icon: Asset
@@ -25,5 +26,5 @@
{icon}
kind={'transparent'}
showTooltip={{ label: title, direction: 'bottom' }}
on:click={() => navigator.clipboard.writeText(text)}
on:click={() => copyTextToClipboard(text)}
/>