Commit 222d2d21 authored by Taurie Davis's avatar Taurie Davis Committed by jboyson

Migrate external link and stop environment button templates

Uses GlButton
parent 2f7101ac
<script>
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale';
/**
......@@ -8,7 +7,7 @@ import { s__ } from '~/locale';
*/
export default {
components: {
Icon,
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -27,15 +26,14 @@ export default {
};
</script>
<template>
<a
<gl-button
v-gl-tooltip
:title="title"
:aria-label="title"
:href="externalUrl"
class="btn external-url"
class="external-url"
target="_blank"
icon="external-link"
rel="noopener noreferrer nofollow"
>
<icon name="external-link" />
</a>
/>
</template>
......@@ -5,16 +5,13 @@
*/
import $ from 'jquery';
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale';
import eventHub from '../event_hub';
import LoadingButton from '../../vue_shared/components/loading_button.vue';
export default {
components: {
Icon,
LoadingButton,
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -55,16 +52,16 @@ export default {
};
</script>
<template>
<loading-button
<gl-button
v-gl-tooltip
:loading="isLoading"
:title="title"
:aria-label="title"
container-class="btn btn-danger d-none d-sm-none d-md-block"
icon="stop"
category="primary"
variant="danger"
data-toggle="modal"
data-target="#stop-environment-modal"
@click="onClick"
>
<icon name="stop" />
</loading-button>
/>
</template>
import $ from 'jquery';
import { shallowMount } from '@vue/test-utils';
import StopComponent from '~/environments/components/environment_stop.vue';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import { GlButton } from '@gitlab/ui';
import eventHub from '~/environments/event_hub';
$.fn.tooltip = () => {};
......@@ -17,7 +17,7 @@ describe('Stop Component', () => {
});
};
const findButton = () => wrapper.find(LoadingButton);
const findButton = () => wrapper.find(GlButton);
beforeEach(() => {
jest.spyOn(window, 'confirm');
......
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