Commit 46a82bda authored by Robert Hunt's avatar Robert Hunt

Updated the description template FA icon to use GlIcon close

Updated the dropdowns.scss to remove absolute styles
parent bed67564
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ /* eslint-disable @gitlab/vue-require-i18n-strings */
import $ from 'jquery'; import $ from 'jquery';
import { GlIcon } from '@gitlab/ui';
import IssuableTemplateSelectors from '../../../templates/issuable_template_selectors'; import IssuableTemplateSelectors from '../../../templates/issuable_template_selectors';
export default { export default {
components: {
GlIcon,
},
props: { props: {
formState: { formState: {
type: Object, type: Object,
...@@ -61,14 +65,14 @@ export default { ...@@ -61,14 +65,14 @@ export default {
<i aria-hidden="true" class="fa fa-chevron-down"> </i> <i aria-hidden="true" class="fa fa-chevron-down"> </i>
</button> </button>
<div class="dropdown-menu dropdown-select"> <div class="dropdown-menu dropdown-select">
<div class="dropdown-title"> <div class="dropdown-title gl-display-flex gl-justify-content-center">
Choose a template <span class="gl-ml-auto">Choose a template</span>
<button <button
class="dropdown-title-button dropdown-menu-close" class="dropdown-title-button dropdown-menu-close gl-ml-auto"
:aria-label="__('Close')" :aria-label="__('Close')"
type="button" type="button"
> >
<i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon"> </i> <gl-icon name="close" class="dropdown-menu-close-icon" :aria-hidden="true" />
</button> </button>
</div> </div>
<div class="dropdown-input"> <div class="dropdown-input">
...@@ -79,12 +83,11 @@ export default { ...@@ -79,12 +83,11 @@ export default {
autocomplete="off" autocomplete="off"
/> />
<i aria-hidden="true" class="fa fa-search dropdown-input-search"> </i> <i aria-hidden="true" class="fa fa-search dropdown-input-search"> </i>
<i <gl-icon
role="button" name="close"
class="dropdown-input-clear js-dropdown-input-clear"
:aria-label="__('Clear templates search input')" :aria-label="__('Clear templates search input')"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" />
>
</i>
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
<div class="dropdown-footer"> <div class="dropdown-footer">
......
...@@ -596,8 +596,6 @@ ...@@ -596,8 +596,6 @@
} }
.dropdown-title-button { .dropdown-title-button {
position: absolute;
top: 0;
padding: 0; padding: 0;
color: $dropdown-title-btn-color; color: $dropdown-title-btn-color;
border: 0; border: 0;
...@@ -609,17 +607,6 @@ ...@@ -609,17 +607,6 @@
} }
} }
.dropdown-menu-close {
top: $gl-padding-6;
right: $gl-padding-8;
width: 20px;
height: 20px;
}
.dropdown-menu-close-icon {
vertical-align: middle;
}
.dropdown-menu-back { .dropdown-menu-back {
left: 10px; left: 10px;
top: $gl-padding-8; top: $gl-padding-8;
...@@ -632,6 +619,7 @@ ...@@ -632,6 +619,7 @@
.fa, .fa,
.input-icon, .input-icon,
.dropdown-input-clear,
.dropdown-input-search { .dropdown-input-search {
position: absolute; position: absolute;
top: $gl-padding-8; top: $gl-padding-8;
...@@ -682,13 +670,15 @@ ...@@ -682,13 +670,15 @@
border-color: $blue-300; border-color: $blue-300;
box-shadow: 0 0 4px $dropdown-input-focus-shadow; box-shadow: 0 0 4px $dropdown-input-focus-shadow;
~ .fa { ~ .fa,
~ .dropdown-input-clear {
color: $gray-700; color: $gray-700;
} }
} }
&:hover { &:hover {
~ .fa { ~ .fa,
~ .dropdown-input-clear {
color: $gray-700; color: $gray-700;
} }
} }
......
---
title: Replace fa-times with GitLab SVG close icon in dropdowns
merge_request: 40585
author:
type: performance
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