aboutsummaryrefslogtreecommitdiff
path: root/src/composable/copy.ts
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-04-22 00:49:03 +0200
committerGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-04-23 15:24:20 +0200
commit362f2fa280fdab210074e9a7e01dde6187924d29 (patch)
tree2a17c13e1db19e0b244cda22eabf8e107218f6b9 /src/composable/copy.ts
parent61ece2387f7061d67177ee41c35db572ffeb84a7 (diff)
downloadit-tools-362f2fa280fdab210074e9a7e01dde6187924d29.tar.gz
it-tools-362f2fa280fdab210074e9a7e01dde6187924d29.tar.zst
it-tools-362f2fa280fdab210074e9a7e01dde6187924d29.zip
feat(new-tool): diff of two json objects
Diffstat (limited to 'src/composable/copy.ts')
-rw-r--r--src/composable/copy.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/composable/copy.ts b/src/composable/copy.ts
index fb29be5..c389001 100644
--- a/src/composable/copy.ts
+++ b/src/composable/copy.ts
@@ -1,8 +1,7 @@
-import { useClipboard } from '@vueuse/core';
+import { useClipboard, type MaybeRef } from '@vueuse/core';
import { useMessage } from 'naive-ui';
-import type { Ref } from 'vue';
-export function useCopy({ source, text = 'Copied to the clipboard' }: { source: Ref; text?: string }) {
+export function useCopy({ source, text = 'Copied to the clipboard' }: { source: MaybeRef<string>; text?: string }) {
const { copy } = useClipboard({ source });
const message = useMessage();