Replace fa-close with GitLab close icon

parent e4695080
import VisualTokenValue from './visual_token_value'; import VisualTokenValue from './visual_token_value';
import { objectToQueryString } from '~/lib/utils/common_utils'; import { objectToQueryString, spriteIcon } from '~/lib/utils/common_utils';
import FilteredSearchContainer from './container'; import FilteredSearchContainer from './container';
export default class FilteredSearchVisualTokens { export default class FilteredSearchVisualTokens {
...@@ -84,7 +84,7 @@ export default class FilteredSearchVisualTokens { ...@@ -84,7 +84,7 @@ export default class FilteredSearchVisualTokens {
<div class="value-container"> <div class="value-container">
<div class="${capitalizeTokenValue ? 'text-capitalize' : ''} value"></div> <div class="${capitalizeTokenValue ? 'text-capitalize' : ''} value"></div>
<div class="remove-token" role="button"> <div class="remove-token" role="button">
<i class="fa fa-close"></i> ${spriteIcon('close', 's16 close-icon')}
</div> </div>
</div> </div>
</div> </div>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import TimeTrackingHelpState from './help_state.vue'; import TimeTrackingHelpState from './help_state.vue';
import TimeTrackingCollapsedState from './collapsed_state.vue'; import TimeTrackingCollapsedState from './collapsed_state.vue';
import TimeTrackingSpentOnlyPane from './spent_only_pane.vue'; import TimeTrackingSpentOnlyPane from './spent_only_pane.vue';
...@@ -11,6 +12,7 @@ import eventHub from '../../event_hub'; ...@@ -11,6 +12,7 @@ import eventHub from '../../event_hub';
export default { export default {
name: 'IssuableTimeTracker', name: 'IssuableTimeTracker',
components: { components: {
GlIcon,
TimeTrackingCollapsedState, TimeTrackingCollapsedState,
TimeTrackingEstimateOnlyPane, TimeTrackingEstimateOnlyPane,
TimeTrackingSpentOnlyPane, TimeTrackingSpentOnlyPane,
...@@ -111,7 +113,7 @@ export default { ...@@ -111,7 +113,7 @@ export default {
class="close-help-button float-right" class="close-help-button float-right"
@click="toggleHelpState(false)" @click="toggleHelpState(false)"
> >
<i class="fa fa-close" aria-hidden="true"> </i> <gl-icon name="close" />
</div> </div>
</div> </div>
<div class="time-tracking-content hide-collapsed"> <div class="time-tracking-content hide-collapsed">
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
} }
.fa-remove::before, .fa-remove::before,
.fa-close::before,
.fa-times::before { .fa-times::before {
content: '\f00d'; content: '\f00d';
} }
......
...@@ -134,20 +134,20 @@ ...@@ -134,20 +134,20 @@
padding-left: 8px; padding-left: 8px;
padding-right: 0; padding-right: 0;
.fa-close { .close-icon {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
&:hover .fa-close { &:hover .close-icon {
color: $gl-text-color; color: $gl-text-color;
} }
&.inverted { &.inverted {
.fa-close { .close-icon {
color: $gl-text-color-secondary-inverted; color: $gl-text-color-secondary-inverted;
} }
&:hover .fa-close { &:hover .close-icon {
color: $gl-text-color-inverted; color: $gl-text-color-inverted;
} }
} }
......
---
title: Replace fa-close icons with GitLab SVG close icon
merge_request: 38505
author:
type: changed
...@@ -280,8 +280,8 @@ describe('Filtered Search Visual Tokens', () => { ...@@ -280,8 +280,8 @@ describe('Filtered Search Visual Tokens', () => {
); );
}); });
it('contains fa-close icon', () => { it('contains close icon', () => {
expect(tokenElement.querySelector('.remove-token .fa-close')).toEqual(expect.anything()); expect(tokenElement.querySelector('.remove-token .close-icon')).toEqual(expect.anything());
}); });
}); });
}); });
......
...@@ -15,7 +15,7 @@ export default class FilteredSearchSpecHelper { ...@@ -15,7 +15,7 @@ export default class FilteredSearchSpecHelper {
<div class="value-container"> <div class="value-container">
<div class="value">${value}</div> <div class="value">${value}</div>
<div class="remove-token" role="button"> <div class="remove-token" role="button">
<i class="fa fa-close"></i> <svg class="s16 close-icon"></svg>
</div> </div>
</div> </div>
</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