Skip to content

Commit a74553c

Browse files
committed
fix(ui): copy icon placement
1 parent 670f735 commit a74553c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/TextareaCopyable.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
5050
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
5151
</n-config-provider>
5252
</n-scrollbar>
53-
<div absolute right-10px top-10px>
54-
<c-tooltip v-if="value" :tooltip="tooltipText" position="left">
53+
<div
54+
v-if="value && copyPlacement !== 'none'"
55+
absolute right-10px
56+
:top-10px="copyPlacement === 'top-right' ? '' : 'no'"
57+
:bottom-10px="copyPlacement === 'bottom-right' ? '' : 'no'"
58+
>
59+
<c-tooltip v-if="value && copyPlacement !== 'outside'" :tooltip="tooltipText" position="left">
5560
<c-button circle important:h-10 important:w-10 @click="copy()">
5661
<n-icon size="22" :component="Copy" />
5762
</c-button>

0 commit comments

Comments
 (0)