Commit 03cc2dc4 authored by Taurie Davis's avatar Taurie Davis

Update clipboard button to use Pajamas

Ensure clipboard buttons that utilize the template
are styled correctly across the application
parent c215b24d
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
:text="blob.path" :text="blob.path"
:gfm="gfmCopyText" :gfm="gfmCopyText"
:title="__('Copy file path')" :title="__('Copy file path')"
category="tertiary"
css-class="btn-clipboard btn-transparent lh-100 position-static" css-class="btn-clipboard btn-transparent lh-100 position-static"
/> />
</div> </div>
......
...@@ -481,7 +481,7 @@ export default { ...@@ -481,7 +481,7 @@ export default {
type="text" type="text"
class="form-control js-hostname" class="form-control js-hostname"
/> />
<span class="input-group-btn"> <span class="input-group-append">
<clipboard-button <clipboard-button
:text="jupyterHostname" :text="jupyterHostname"
:title="s__('ClusterIntegration|Copy Jupyter Hostname')" :title="s__('ClusterIntegration|Copy Jupyter Hostname')"
......
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlButtonGroup, GlButton, GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlButtonGroup, GlButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
...@@ -182,14 +182,14 @@ export default { ...@@ -182,14 +182,14 @@ export default {
:endpoint="commit.pipeline_status_path" :endpoint="commit.pipeline_status_path"
class="d-inline-flex" class="d-inline-flex"
/> />
<div class="commit-sha-group"> <gl-button-group class="gl-ml-4" data-testid="commit-sha-group">
<div class="label label-monospace monospace" v-text="commit.short_id"></div> <gl-button label class="gl-font-monospace" v-text="commit.short_id" />
<clipboard-button <clipboard-button
:text="commit.id" :text="commit.id"
:title="__('Copy commit SHA')" :title="__('Copy commit SHA')"
class="btn btn-default" class="input-group-text"
/> />
</div> </gl-button-group>
<div <div
v-if="hasNeighborCommits && glFeatures.mrCommitNeighborNav" v-if="hasNeighborCommits && glFeatures.mrCommitNeighborNav"
class="commit-nav-buttons ml-3" class="commit-nav-buttons ml-3"
......
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
class="js-file-title file-title file-title-flex-parent" class="js-file-title file-title file-title-flex-parent"
@click.self="handleToggleFile" @click.self="handleToggleFile"
> >
<div class="file-header-content"> <div class="file-header-content gl-display-flex gl-align-items-center gl-pr-0!">
<gl-icon <gl-icon
v-if="collapsible" v-if="collapsible"
ref="collapseIcon" ref="collapseIcon"
...@@ -254,7 +254,8 @@ export default { ...@@ -254,7 +254,8 @@ export default {
:title="__('Copy file path')" :title="__('Copy file path')"
:text="diffFile.file_path" :text="diffFile.file_path"
:gfm="gfmCopyText" :gfm="gfmCopyText"
css-class="btn-default btn-transparent btn-clipboard" data-testid="diff-file-copy-clipboard"
category="tertiary"
data-track-event="click_copy_file_button" data-track-event="click_copy_file_button"
data-track-label="diff_copy_file_path_button" data-track-label="diff_copy_file_path_button"
data-track-property="diff_copy_file" data-track-property="diff_copy_file"
......
...@@ -94,7 +94,9 @@ export default { ...@@ -94,7 +94,9 @@ export default {
<clipboard-button <clipboard-button
:title="__('Copy file path')" :title="__('Copy file path')"
:text="filePath" :text="filePath"
css-class="btn-default btn-transparent btn-clipboard position-static" category="tertiary"
size="small"
css-class="gl-mr-1"
/> />
<gl-sprintf v-if="errorFn" :message="__('%{spanStart}in%{spanEnd} %{errorFn}')"> <gl-sprintf v-if="errorFn" :message="__('%{spanStart}in%{spanEnd} %{errorFn}')">
......
...@@ -32,26 +32,25 @@ export default { ...@@ -32,26 +32,25 @@ export default {
block: !isLastBlock, block: !isLastBlock,
}" }"
> >
<p class="gl-mb-2"> <span class="font-weight-bold">{{ __('Commit') }}</span>
<span class="font-weight-bold">{{ __('Commit') }}</span>
<gl-link :href="commit.commit_path" class="js-commit-sha commit-sha link-commit"> <gl-link :href="commit.commit_path" class="js-commit-sha commit-sha link-commit">
{{ commit.short_id }} {{ commit.short_id }}
</gl-link> </gl-link>
<clipboard-button <clipboard-button
:text="commit.id" :text="commit.id"
:title="__('Copy commit SHA')" :title="__('Copy commit SHA')"
css-class="btn btn-clipboard btn-transparent" category="tertiary"
/> size="small"
/>
<span v-if="mergeRequest"> <span v-if="mergeRequest">
in in
<gl-link :href="mergeRequest.path" class="js-link-commit link-commit" <gl-link :href="mergeRequest.path" class="js-link-commit link-commit"
>!{{ mergeRequest.iid }}</gl-link >!{{ mergeRequest.iid }}</gl-link
> >
</span> </span>
</p>
<p class="gl-mb-0">{{ commit.title }}</p> <p class="gl-mb-0">{{ commit.title }}</p>
</div> </div>
......
...@@ -49,7 +49,8 @@ export default { ...@@ -49,7 +49,8 @@ export default {
<clipboard-button <clipboard-button
:text="packageEntity.pipeline.sha" :text="packageEntity.pipeline.sha"
:title="__('Copy commit SHA')" :title="__('Copy commit SHA')"
css-class="gl-border-0 gl-py-0 gl-px-2" category="tertiary"
size="small"
/> />
</template> </template>
......
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
<input <input
ref="service-desk-incoming-email" ref="service-desk-incoming-email"
type="text" type="text"
class="form-control incoming-email h-auto" class="form-control incoming-email"
:placeholder="__('Incoming email')" :placeholder="__('Incoming email')"
:aria-label="__('Incoming email')" :aria-label="__('Incoming email')"
aria-describedby="incoming-email-describer" aria-describedby="incoming-email-describer"
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
<clipboard-button <clipboard-button
:title="__('Copy')" :title="__('Copy')"
:text="incomingEmail" :text="incomingEmail"
css-class="btn qa-clipboard-button" css-class="input-group-text qa-clipboard-button"
/> />
</div> </div>
</div> </div>
......
...@@ -197,7 +197,8 @@ export default { ...@@ -197,7 +197,8 @@ export default {
v-if="tag.digest" v-if="tag.digest"
:title="tag.digest" :title="tag.digest"
:text="tag.digest" :text="tag.digest"
css-class="btn-default btn-transparent btn-clipboard gl-p-0" category="tertiary"
size="small"
/> />
</details-row> </details-row>
</template> </template>
...@@ -212,7 +213,8 @@ export default { ...@@ -212,7 +213,8 @@ export default {
v-if="formattedRevision" v-if="formattedRevision"
:title="formattedRevision" :title="formattedRevision"
:text="formattedRevision" :text="formattedRevision"
css-class="btn-default btn-transparent btn-clipboard gl-p-0" category="tertiary"
size="small"
/> />
</details-row> </details-row>
</template> </template>
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
:disabled="item.deleting" :disabled="item.deleting"
:text="item.location" :text="item.location"
:title="item.location" :title="item.location"
css-class="btn-default btn-transparent btn-clipboard gl-text-gray-300" category="tertiary"
/> />
<gl-icon <gl-icon
v-if="item.failedDelete" v-if="item.failedDelete"
......
...@@ -83,11 +83,7 @@ export default { ...@@ -83,11 +83,7 @@ export default {
<span class="js-expanded monospace gl-pl-2">{{ sha(index) }}</span> <span class="js-expanded monospace gl-pl-2">{{ sha(index) }}</span>
</template> </template>
</expand-button> </expand-button>
<clipboard-button <clipboard-button :title="__('Copy evidence SHA')" :text="sha(index)" category="tertiary" />
:title="__('Copy evidence SHA')"
:text="sha(index)"
css-class="btn-default btn-transparent btn-clipboard"
/>
</div> </div>
<div class="d-flex align-items-center text-muted"> <div class="d-flex align-items-center text-muted">
......
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { GlTooltipDirective, GlLink, GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton, GlButtonGroup, GlLoadingIcon } from '@gitlab/ui';
import defaultAvatarUrl from 'images/no_avatar.png'; import defaultAvatarUrl from 'images/no_avatar.png';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
...@@ -17,8 +17,9 @@ export default { ...@@ -17,8 +17,9 @@ export default {
TimeagoTooltip, TimeagoTooltip,
ClipboardButton, ClipboardButton,
CiIcon, CiIcon,
GlLink,
GlButton, GlButton,
GlButtonGroup,
GlLink,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -167,16 +168,19 @@ export default { ...@@ -167,16 +168,19 @@ export default {
/> />
</gl-link> </gl-link>
</div> </div>
<div class="commit-sha-group d-flex"> <gl-button-group class="gl-ml-4 js-commit-sha-group">
<div class="label label-monospace monospace"> <gl-button
{{ showCommitId }} label
</div> class="gl-font-monospace"
data-testid="last-commit-id-label"
v-text="showCommitId"
/>
<clipboard-button <clipboard-button
:text="commit.sha" :text="commit.sha"
:title="__('Copy commit SHA')" :title="__('Copy commit SHA')"
tooltip-placement="bottom" class="input-group-text"
/> />
</div> </gl-button-group>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -111,9 +111,10 @@ export default { ...@@ -111,9 +111,10 @@ export default {
v-html="mr.sourceBranchLink" v-html="mr.sourceBranchLink"
/><clipboard-button /><clipboard-button
ref="copyBranchNameButton" ref="copyBranchNameButton"
data-testid="mr-widget-copy-clipboard"
:text="branchNameClipboardData" :text="branchNameClipboardData"
:title="__('Copy branch name')" :title="__('Copy branch name')"
css-class="btn-default btn-transparent btn-clipboard" category="tertiary"
/> />
{{ s__('mrWidget|into') }} {{ s__('mrWidget|into') }}
<tooltip-on-truncate <tooltip-on-truncate
......
...@@ -177,7 +177,9 @@ export default { ...@@ -177,7 +177,9 @@ export default {
<clipboard-button <clipboard-button
:title="__('Copy commit SHA')" :title="__('Copy commit SHA')"
:text="mr.mergeCommitSha" :text="mr.mergeCommitSha"
css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha" css-class="js-mr-merged-copy-sha"
category="tertiary"
size="small"
/> />
</template> </template>
</p> </p>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* css-class="btn-transparent" * css-class="btn-transparent"
* /> * />
*/ */
import { GlDeprecatedButton, GlTooltipDirective, GlIcon } from '@gitlab/ui'; import { GlButton, GlTooltipDirective } from '@gitlab/ui';
export default { export default {
name: 'ClipboardButton', name: 'ClipboardButton',
...@@ -20,8 +20,7 @@ export default { ...@@ -20,8 +20,7 @@ export default {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
GlDeprecatedButton, GlButton,
GlIcon,
}, },
props: { props: {
text: { text: {
...@@ -50,7 +49,17 @@ export default { ...@@ -50,7 +49,17 @@ export default {
cssClass: { cssClass: {
type: String, type: String,
required: false, required: false,
default: 'btn-default', default: null,
},
category: {
type: String,
required: false,
default: 'secondary',
},
size: {
type: String,
required: false,
default: 'medium',
}, },
}, },
computed: { computed: {
...@@ -65,13 +74,15 @@ export default { ...@@ -65,13 +74,15 @@ export default {
</script> </script>
<template> <template>
<gl-deprecated-button <gl-button
v-gl-tooltip="{ placement: tooltipPlacement, container: tooltipContainer }" v-gl-tooltip="{ placement: tooltipPlacement, container: tooltipContainer }"
v-gl-tooltip.hover.blur v-gl-tooltip.hover.blur
:class="cssClass" :class="cssClass"
:title="title" :title="title"
:data-clipboard-text="clipboardText" :data-clipboard-text="clipboardText"
> :category="category"
<gl-icon name="copy-to-clipboard" /> :size="size"
</gl-deprecated-button> icon="copy-to-clipboard"
:aria-label="__('Copy this value')"
/>
</template> </template>
---
title: Update clipboard button to use Pajamas
merge_request: 38421
author:
type: changed
...@@ -7200,6 +7200,9 @@ msgstr "" ...@@ -7200,6 +7200,9 @@ msgstr ""
msgid "Copy the code below to implement tracking in your application:" msgid "Copy the code below to implement tracking in your application:"
msgstr "" msgstr ""
msgid "Copy this value"
msgstr ""
msgid "Copy to clipboard" msgid "Copy to clipboard"
msgstr "" msgstr ""
......
...@@ -69,7 +69,7 @@ RSpec.describe 'Projects tree', :js do ...@@ -69,7 +69,7 @@ RSpec.describe 'Projects tree', :js do
# Check last commit # Check last commit
expect(find('.commit-content').text).to include(message) expect(find('.commit-content').text).to include(message)
expect(find('.commit-sha-group').text).to eq(short_newrev) expect(find('.js-commit-sha-group').text).to eq(short_newrev)
end end
end end
......
...@@ -27,8 +27,10 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = ` ...@@ -27,8 +27,10 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = `
</small> </small>
<clipboard-button-stub <clipboard-button-stub
category="tertiary"
cssclass="btn-clipboard btn-transparent lh-100 position-static" cssclass="btn-clipboard btn-transparent lh-100 position-static"
gfm="\`foo/bar/dummy.md\`" gfm="\`foo/bar/dummy.md\`"
size="medium"
text="foo/bar/dummy.md" text="foo/bar/dummy.md"
title="Copy file path" title="Copy file path"
tooltipplacement="top" tooltipplacement="top"
......
...@@ -25,7 +25,7 @@ describe('diffs/components/commit_item', () => { ...@@ -25,7 +25,7 @@ describe('diffs/components/commit_item', () => {
const getTitleElement = () => wrapper.find('.commit-row-message.item-title'); const getTitleElement = () => wrapper.find('.commit-row-message.item-title');
const getDescElement = () => wrapper.find('pre.commit-row-description'); const getDescElement = () => wrapper.find('pre.commit-row-description');
const getDescExpandElement = () => wrapper.find('.commit-content .js-toggle-button'); const getDescExpandElement = () => wrapper.find('.commit-content .js-toggle-button');
const getShaElement = () => wrapper.find('.commit-sha-group'); const getShaElement = () => wrapper.find('[data-testid="commit-sha-group"]');
const getAvatarElement = () => wrapper.find('.user-avatar-link'); const getAvatarElement = () => wrapper.find('.user-avatar-link');
const getCommitterElement = () => wrapper.find('.committer'); const getCommitterElement = () => wrapper.find('.committer');
const getCommitActionsElement = () => wrapper.find('.commit-actions'); const getCommitActionsElement = () => wrapper.find('.commit-actions');
...@@ -84,8 +84,8 @@ describe('diffs/components/commit_item', () => { ...@@ -84,8 +84,8 @@ describe('diffs/components/commit_item', () => {
it('renders commit sha', () => { it('renders commit sha', () => {
const shaElement = getShaElement(); const shaElement = getShaElement();
const labelElement = shaElement.find('.label'); const labelElement = shaElement.find('[data-testid="commit-sha-group"] button');
const buttonElement = shaElement.find('button'); const buttonElement = shaElement.find('button.input-group-text');
expect(labelElement.text()).toEqual(commit.short_id); expect(labelElement.text()).toEqual(commit.short_id);
expect(buttonElement.props('text')).toBe(commit.id); expect(buttonElement.props('text')).toBe(commit.id);
......
...@@ -37,7 +37,7 @@ describe('DiffFile', () => { ...@@ -37,7 +37,7 @@ describe('DiffFile', () => {
expect(el.querySelectorAll('.diff-content.hidden').length).toEqual(0); expect(el.querySelectorAll('.diff-content.hidden').length).toEqual(0);
expect(el.querySelector('.js-file-title')).toBeDefined(); expect(el.querySelector('.js-file-title')).toBeDefined();
expect(el.querySelector('.btn-clipboard')).toBeDefined(); expect(el.querySelector('[data-testid="diff-file-copy-clipboard"]')).toBeDefined();
expect(el.querySelector('.file-title-name').innerText.indexOf(file_path)).toBeGreaterThan(-1); expect(el.querySelector('.file-title-name').innerText.indexOf(file_path)).toBeGreaterThan(-1);
expect(el.querySelector('.js-syntax-highlight')).toBeDefined(); expect(el.querySelector('.js-syntax-highlight')).toBeDefined();
...@@ -47,7 +47,7 @@ describe('DiffFile', () => { ...@@ -47,7 +47,7 @@ describe('DiffFile', () => {
.then(() => { .then(() => {
expect(el.querySelectorAll('.line_content').length).toBe(8); expect(el.querySelectorAll('.line_content').length).toBe(8);
expect(el.querySelectorAll('.js-line-expansion-content').length).toBe(1); expect(el.querySelectorAll('.js-line-expansion-content').length).toBe(1);
triggerEvent('.btn-clipboard'); triggerEvent('[data-testid="diff-file-copy-clipboard"]');
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
...@@ -56,11 +56,11 @@ describe('DiffFile', () => { ...@@ -56,11 +56,11 @@ describe('DiffFile', () => {
it('should track a click event on copy to clip board button', done => { it('should track a click event on copy to clip board button', done => {
const el = vm.$el; const el = vm.$el;
expect(el.querySelector('.btn-clipboard')).toBeDefined(); expect(el.querySelector('[data-testid="diff-file-copy-clipboard"]')).toBeDefined();
vm.file.renderIt = true; vm.file.renderIt = true;
vm.$nextTick() vm.$nextTick()
.then(() => { .then(() => {
triggerEvent('.btn-clipboard'); triggerEvent('[data-testid="diff-file-copy-clipboard"]');
expect(trackingSpy).toHaveBeenCalledWith('_category_', 'click_copy_file_button', { expect(trackingSpy).toHaveBeenCalledWith('_category_', 'click_copy_file_button', {
label: 'diff_copy_file_path_button', label: 'diff_copy_file_path_button',
......
...@@ -32,7 +32,8 @@ exports[`publish_method renders 1`] = ` ...@@ -32,7 +32,8 @@ exports[`publish_method renders 1`] = `
</gl-link-stub> </gl-link-stub>
<clipboard-button-stub <clipboard-button-stub
cssclass="gl-border-0 gl-py-0 gl-px-2" category="tertiary"
size="small"
text="sha-baz" text="sha-baz"
title="Copy commit SHA" title="Copy commit SHA"
tooltipplacement="top" tooltipplacement="top"
......
...@@ -77,24 +77,31 @@ exports[`Repository last commit component renders commit widget 1`] = ` ...@@ -77,24 +77,31 @@ exports[`Repository last commit component renders commit widget 1`] = `
</gl-link-stub> </gl-link-stub>
</div> </div>
<div <gl-button-group-stub
class="commit-sha-group d-flex" class="gl-ml-4 js-commit-sha-group"
> >
<div <gl-button-stub
class="label label-monospace monospace" buttontextclasses=""
category="primary"
class="gl-font-monospace"
data-testid="last-commit-id-label"
icon=""
label="true"
size="medium"
variant="default"
> >
12345678
12345678 </gl-button-stub>
</div>
<clipboard-button-stub <clipboard-button-stub
cssclass="btn-default" category="secondary"
class="input-group-text"
size="medium"
text="123456789" text="123456789"
title="Copy commit SHA" title="Copy commit SHA"
tooltipplacement="bottom" tooltipplacement="top"
/> />
</div> </gl-button-group-stub>
</div> </div>
</div> </div>
</div> </div>
...@@ -181,24 +188,31 @@ exports[`Repository last commit component renders the signature HTML as returned ...@@ -181,24 +188,31 @@ exports[`Repository last commit component renders the signature HTML as returned
</gl-link-stub> </gl-link-stub>
</div> </div>
<div <gl-button-group-stub
class="commit-sha-group d-flex" class="gl-ml-4 js-commit-sha-group"
> >
<div <gl-button-stub
class="label label-monospace monospace" buttontextclasses=""
category="primary"
class="gl-font-monospace"
data-testid="last-commit-id-label"
icon=""
label="true"
size="medium"
variant="default"
> >
12345678
12345678 </gl-button-stub>
</div>
<clipboard-button-stub <clipboard-button-stub
cssclass="btn-default" category="secondary"
class="input-group-text"
size="medium"
text="123456789" text="123456789"
title="Copy commit SHA" title="Copy commit SHA"
tooltipplacement="bottom" tooltipplacement="top"
/> />
</div> </gl-button-group-stub>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -78,7 +78,7 @@ describe('Repository last commit component', () => { ...@@ -78,7 +78,7 @@ describe('Repository last commit component', () => {
factory(); factory();
return vm.vm.$nextTick(() => { return vm.vm.$nextTick(() => {
expect(vm.find('.label-monospace').text()).toEqual('12345678'); expect(vm.find('[data-testid="last-commit-id-label"]').text()).toEqual('12345678');
}); });
}); });
......
...@@ -130,7 +130,7 @@ describe('MRWidgetHeader', () => { ...@@ -130,7 +130,7 @@ describe('MRWidgetHeader', () => {
}); });
it('renders clipboard button', () => { it('renders clipboard button', () => {
expect(vm.$el.querySelector('.btn-clipboard')).not.toEqual(null); expect(vm.$el.querySelector('[data-testid="mr-widget-copy-clipboard"]')).not.toEqual(null);
}); });
it('renders target branch', () => { it('renders target branch', () => {
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
describe('clipboard button', () => { describe('clipboard button', () => {
...@@ -26,9 +26,8 @@ describe('clipboard button', () => { ...@@ -26,9 +26,8 @@ describe('clipboard button', () => {
}); });
it('renders a button for clipboard', () => { it('renders a button for clipboard', () => {
expect(wrapper.find(GlDeprecatedButton).exists()).toBe(true); expect(wrapper.find(GlButton).exists()).toBe(true);
expect(wrapper.attributes('data-clipboard-text')).toBe('copy me'); expect(wrapper.attributes('data-clipboard-text')).toBe('copy me');
expect(wrapper.find(GlIcon).props('name')).toBe('copy-to-clipboard');
}); });
it('should have a tooltip with default values', () => { it('should have a tooltip with default values', () => {
......
...@@ -38,7 +38,8 @@ exports[`Package code instruction single line to match the default snapshot 1`] ...@@ -38,7 +38,8 @@ exports[`Package code instruction single line to match the default snapshot 1`]
data-testid="instruction-button" data-testid="instruction-button"
> >
<button <button
class="btn input-group-text btn-secondary btn-md btn-default" aria-label="Copy this value"
class="btn input-group-text btn-default btn-md gl-button btn-default-secondary btn-icon"
data-clipboard-text="npm i @my-package" data-clipboard-text="npm i @my-package"
title="Copy npm install command" title="Copy npm install command"
type="button" type="button"
...@@ -53,6 +54,8 @@ exports[`Package code instruction single line to match the default snapshot 1`] ...@@ -53,6 +54,8 @@ exports[`Package code instruction single line to match the default snapshot 1`]
href="#copy-to-clipboard" href="#copy-to-clipboard"
/> />
</svg> </svg>
<!---->
</button> </button>
</span> </span>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment