Skip to content

Commit 135b311

Browse files
committed
fix(TextAreaCopyable): copy button placement
1 parent 49f4c88 commit 135b311

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
@@ -63,8 +63,13 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
6363
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
6464
</n-config-provider>
6565
</n-scrollbar>
66-
<div absolute right-10px top-10px>
67-
<c-tooltip v-if="value" :tooltip="tooltipText" position="left">
66+
<div
67+
v-if="value && copyPlacement !== 'none'"
68+
absolute right-10px
69+
:top-10px="copyPlacement === 'top-right' ? '' : 'no'"
70+
:bottom-10px="copyPlacement === 'bottom-right' ? '' : 'no'"
71+
>
72+
<c-tooltip v-if="value && copyPlacement !== 'outside'" :tooltip="tooltipText" position="left">
6873
<c-button circle important:h-10 important:w-10 @click="copy()">
6974
<n-icon size="22" :component="Copy" />
7075
</c-button>

0 commit comments

Comments
 (0)