Commit e1401923 authored by Jarek Ostrowski's avatar Jarek Ostrowski

Update issue edit button to gl-button

MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40438
parent c6a57cc1
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
import animateMixin from '../mixins/animate'; import animateMixin from '../mixins/animate';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import tooltip from '../../vue_shared/directives/tooltip';
import { spriteIcon } from '../../lib/utils/common_utils';
export default { export default {
components: {
GlButton,
},
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
mixins: [animateMixin], mixins: [animateMixin],
props: { props: {
...@@ -41,11 +43,6 @@ export default { ...@@ -41,11 +43,6 @@ export default {
titleEl: document.querySelector('title'), titleEl: document.querySelector('title'),
}; };
}, },
computed: {
pencilIcon() {
return spriteIcon('pencil', 'link-highlight');
},
},
watch: { watch: {
titleHtml() { titleHtml() {
this.setPageTitle(); this.setPageTitle();
...@@ -76,17 +73,13 @@ export default { ...@@ -76,17 +73,13 @@ export default {
dir="auto" dir="auto"
v-html="titleHtml" v-html="titleHtml"
></h2> ></h2>
<button <gl-button
v-if="showInlineEditButton && canUpdate" v-if="showInlineEditButton && canUpdate"
v-tooltip v-gl-tooltip.bottom
type="button" icon="pencil"
class="btn btn-default btn-edit btn-svg js-issuable-edit class="btn-edit js-issuable-edit qa-edit-button"
qa-edit-button"
title="Edit title and description" title="Edit title and description"
data-placement="bottom"
data-container="body"
@click="edit" @click="edit"
v-html="pencilIcon" />
></button>
</div> </div>
</template> </template>
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
.title-container { .title-container {
display: flex; display: flex;
align-items: flex-start;
} }
.title { .title {
...@@ -65,7 +66,6 @@ ...@@ -65,7 +66,6 @@
.btn-edit { .btn-edit {
margin-left: auto; margin-left: auto;
height: $gl-padding * 2;
} }
.emoji-block { .emoji-block {
......
---
title: Update issue edit button to gl-button
merge_request: 40438
author:
type: changed
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