Skip to content

Commit 08d0766

Browse files
authored
[Code] adjust search bar suggestions style (#32726)
1 parent b7eb82a commit 08d0766

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

x-pack/plugins/code/public/components/main/main.scss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
}
135135

136136
.codeSearch__suggestion-item {
137-
background: $euiColorLightestShade;
138137
height: 3rem;
139138
margin: 0 $euiSize;
140139
border-radius: $euiSizeXS;
@@ -146,7 +145,7 @@
146145
}
147146
}
148147

149-
.codeSearch__suggestion--active {
148+
.codeSearch__suggestion-item--active {
150149
background: $euiColorLightShade;
151150
}
152151

@@ -188,15 +187,24 @@
188187
overflow-x: hidden;
189188
}
190189

190+
.codeSearch-suggestion__group {
191+
border-top: $euiBorderThin;
192+
}
193+
191194
.codeSearch-suggestion__group-header {
192195
padding: $euiSizeL;
193-
border-top: $euiBorderThin;
194196
}
195197
.codeSearch-suggestion__group-title {
198+
font-weight: bold;
196199
margin-left: $euiSizeS;
197200
display: inline-block;
198201
}
199202

203+
.codeSearch-suggestion__group-result {
204+
color: $euiColorDarkShade;
205+
font-size: $euiFontSizeXS;
206+
}
207+
200208
.codeSearch-suggestion__link {
201209
height: $euiSize;
202210
line-height: $euiSize;

x-pack/plugins/code/public/components/query_bar/components/typeahead/__snapshots__/suggestions_component.test.tsx.snap

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ exports[`render full suggestions component 1`] = `
132132
className="kbnTypeahead__popover"
133133
>
134134
<div
135-
className="kbnTypeahead__items"
135+
className="kbnTypeahead__items codeSearch-suggestion__group"
136136
data-test-subj="codeTypeaheadList-symbol"
137137
id="kbnTypeahead__items"
138138
key="symbol-suggestions"
@@ -214,7 +214,9 @@ exports[`render full suggestions component 1`] = `
214214
</EuiText>
215215
</div>
216216
</EuiFlexGroup>
217-
<div>
217+
<div
218+
className="codeSearch-suggestion__group-result"
219+
>
218220
1
219221
Result
220222
</div>
@@ -315,7 +317,7 @@ exports[`render full suggestions component 1`] = `
315317
</Component>
316318
</div>
317319
<div
318-
className="kbnTypeahead__items"
320+
className="kbnTypeahead__items codeSearch-suggestion__group"
319321
data-test-subj="codeTypeaheadList-file"
320322
id="kbnTypeahead__items"
321323
key="file-suggestions"
@@ -397,7 +399,9 @@ exports[`render full suggestions component 1`] = `
397399
</EuiText>
398400
</div>
399401
</EuiFlexGroup>
400-
<div>
402+
<div
403+
className="codeSearch-suggestion__group-result"
404+
>
401405
1
402406
Result
403407
</div>
@@ -451,7 +455,7 @@ exports[`render full suggestions component 1`] = `
451455
</Component>
452456
</div>
453457
<div
454-
className="kbnTypeahead__items"
458+
className="kbnTypeahead__items codeSearch-suggestion__group"
455459
data-test-subj="codeTypeaheadList-repository"
456460
id="kbnTypeahead__items"
457461
key="repository-suggestions"
@@ -534,7 +538,9 @@ exports[`render full suggestions component 1`] = `
534538
</EuiText>
535539
</div>
536540
</EuiFlexGroup>
537-
<div>
541+
<div
542+
className="codeSearch-suggestion__group-result"
543+
>
538544
2
539545
Result
540546
s

x-pack/plugins/code/public/components/query_bar/components/typeahead/suggestions_component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class SuggestionsComponent extends Component<Props> {
9595
{this.getGroupTitle(group.type)}
9696
</EuiText>
9797
</EuiFlexGroup>
98-
<div>
98+
<div className="codeSearch-suggestion__group-result">
9999
{total} Result
100100
{total === 1 ? '' : 's'}
101101
</div>
@@ -117,7 +117,7 @@ export class SuggestionsComponent extends Component<Props> {
117117
return (
118118
<div
119119
id="kbnTypeahead__items"
120-
className="kbnTypeahead__items"
120+
className="kbnTypeahead__items codeSearch-suggestion__group"
121121
role="listbox"
122122
data-test-subj={`codeTypeaheadList-${type}`}
123123
ref={node => (this.parentNode = node)}

0 commit comments

Comments
 (0)