Commit c914e755 authored by Robert Hunt's avatar Robert Hunt

Replace epics add clear button FA icon with GlIcon close

parent a8ce0ddb
...@@ -9,12 +9,13 @@ export default { ...@@ -9,12 +9,13 @@ export default {
</script> </script>
<template> <template>
<div class="dropdown-title"> <div class="dropdown-title gl-display-flex gl-align-items-center">
<span>{{ __('Assign epic') }}</span> <span class="gl-ml-auto">{{ __('Assign epic') }}</span>
<gl-button <gl-button
:aria-label="__('Close')" :aria-label="__('Close')"
category="tertiary" category="tertiary"
class="dropdown-title-button dropdown-menu-close" class="dropdown-title-button dropdown-menu-close gl-ml-auto"
size="small"
icon="close" icon="close"
/> />
</div> </div>
......
<script> <script>
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlIcon, GlIcon,
}, },
directives: { directives: {
...@@ -40,9 +40,10 @@ export default { ...@@ -40,9 +40,10 @@ export default {
@keyup="handleKeyUp" @keyup="handleKeyUp"
/> />
<gl-icon v-show="!query" name="search" /> <gl-icon v-show="!query" name="search" />
<gl-deprecated-button <gl-button
variant="link" variant="link"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" icon="close"
class="dropdown-input-clear js-dropdown-input-clear"
data-hidden="true" data-hidden="true"
@click.stop="handleInputClear" @click.stop="handleInputClear"
/> />
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue'; import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue';
const createComponent = () => const createComponent = () =>
...@@ -96,16 +96,11 @@ describe('EpicsSelect', () => { ...@@ -96,16 +96,11 @@ describe('EpicsSelect', () => {
}); });
it('should render input clear button', () => { it('should render input clear button', () => {
const clearButtonEl = wrapper.find(GlDeprecatedButton); const clearButtonEl = wrapper.find(GlButton);
expect(clearButtonEl.exists()).toBe(true); expect(clearButtonEl.exists()).toBe(true);
expect(clearButtonEl.classes()).toEqual( expect(clearButtonEl.classes()).toEqual(
expect.arrayContaining([ expect.arrayContaining(['dropdown-input-clear', 'js-dropdown-input-clear']),
'fa',
'fa-times',
'dropdown-input-clear',
'js-dropdown-input-clear',
]),
); );
}); });
}); });
......
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