aboutsummaryrefslogtreecommitdiff
path: root/src/components/InputCopyable.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-22 23:31:40 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-22 23:31:40 +0200
commit086d31eab5b3b1a927803eab5e650585f61abe19 (patch)
tree7c6b14d08370694f24d2b967343b37b16271bf3c /src/components/InputCopyable.vue
parent8e29a97404ea0aa9b9b576656358c8c276b6f992 (diff)
downloadit-tools-086d31eab5b3b1a927803eab5e650585f61abe19.tar.gz
it-tools-086d31eab5b3b1a927803eab5e650585f61abe19.tar.zst
it-tools-086d31eab5b3b1a927803eab5e650585f61abe19.zip
refactor(lint): linter auto fix
Diffstat (limited to 'src/components/InputCopyable.vue')
-rw-r--r--src/components/InputCopyable.vue36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/components/InputCopyable.vue b/src/components/InputCopyable.vue
index ad4cc44..4105abf 100644
--- a/src/components/InputCopyable.vue
+++ b/src/components/InputCopyable.vue
@@ -3,45 +3,41 @@
<template #suffix>
<n-tooltip trigger="hover">
<template #trigger>
- <n-button
- quaternary
- circle
- @click="onCopyClicked"
- >
+ <n-button quaternary circle @click="onCopyClicked">
<n-icon :component="ContentCopyFilled" />
</n-button>
</template>
{{ tooltipText }}
</n-tooltip>
- </template>
+ </template>
</n-input>
</template>
<script setup lang="ts">
-import { useVModel, useClipboard } from '@vueuse/core'
-import { ContentCopyFilled } from '@vicons/material'
+import { useVModel, useClipboard } from '@vueuse/core';
+import { ContentCopyFilled } from '@vicons/material';
import { ref } from 'vue';
-const props = defineProps<{ value: string, }>()
-const emit = defineEmits(['update:value'])
+const props = defineProps<{ value: string }>();
+const emit = defineEmits(['update:value']);
-const value = useVModel(props, 'value', emit)
-const tooltipText = ref('Copy to clipboard')
+const value = useVModel(props, 'value', emit);
+const tooltipText = ref('Copy to clipboard');
-const {copy} = useClipboard({source: value})
+const { copy } = useClipboard({ source: value });
function onCopyClicked() {
- copy();
- tooltipText.value = 'Copied !'
+ copy();
+ tooltipText.value = 'Copied !';
- setTimeout(() => {
- tooltipText.value = 'Copy to clipboard'
- }, 2000)
+ setTimeout(() => {
+ tooltipText.value = 'Copy to clipboard';
+ }, 2000);
}
</script>
<style scoped>
::v-deep(.n-input-wrapper) {
- padding-right: 5px;
+ padding-right: 5px;
}
-</style> \ No newline at end of file
+</style>