Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kcopy): truncated text should have max-width on tooltip #2388

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sandbox/pages/SandboxCopy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
:text="uuid1"
truncate
/>
<KCopy
:text="desc1"
truncate
/>
<KCopy
badge
:text="desc1"
truncate
/>
</SandboxSectionComponent>
<SandboxSectionComponent title="truncationLimit">
<KCopy
Expand Down Expand Up @@ -138,6 +147,7 @@ import SandboxSectionComponent from '../components/SandboxSectionComponent.vue'
import KCopy from '@/components/KCopy/KCopy.vue'

const uuid1: string = '2cf64827-6c70-4116-906b-4c9aae83fc4a'
const desc1: string = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'

const kButtonKCopyElement = ref<InstanceType<typeof KCopy> | null>(null)

Expand Down
1 change: 1 addition & 0 deletions src/components/KCopy/KCopy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
v-if="format !== 'hidden'"
:class="[textTooltipClasses]"
data-testid="copy-tooltip-wrapper"
max-width="500px"
placement="bottom-start"
:text="textTooltipLabel"
>
Expand Down