Skip to content

Commit 67a2b3c

Browse files
committed
fix(design): error screen, loading indicator, no results links
1 parent c9273bf commit 67a2b3c

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

src/ErrorScreen.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import React from 'react';
2+
import { ErrorIcon } from './icons';
23

34
export function ErrorScreen() {
45
return (
56
<div className="DocSearch-ErrorScreen">
6-
<p>
7-
We‘re unable to fetch results. You might want to check your network
8-
connection.
7+
<div className="DocSearch-Screen-Icon">
8+
<ErrorIcon />
9+
</div>
10+
<p className="DocSearch-Title">
11+
Unable to fetch results
12+
</p>
13+
<p className="DocSearch-Help">
14+
You might want to check your network connection.
915
</p>
1016
</div>
1117
);

src/NoResultsScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function NoResultsScreen(props: NoResultsScreenProps) {
2929
<NoResultsIcon />
3030
</div>
3131
<p className="DocSearch-Title">
32-
No results for "<strong>{props.state.query}</strong>".
32+
No results for "<strong>{props.state.query}</strong>"
3333
</p>
3434

3535
{searchSuggestions && searchSuggestions.length > 0 && (

src/style.css

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ html[data-theme='dark'] {
256256
.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,
257257
.DocSearch-MagnifierLabel,
258258
.DocSearch-Reset {
259+
color: var(--docsearch-highlight-color);
259260
display: flex;
260261
align-items: center;
261262
justify-content: center;
@@ -305,10 +306,6 @@ html[data-theme='dark'] {
305306
height:24px;
306307
}
307308

308-
.DocSearch-MagnifierLabel {
309-
color: var(--docsearch-highlight-color);
310-
}
311-
312309
.DocSearch-Cancel {
313310
display: none;
314311
}
@@ -587,7 +584,7 @@ svg.DocSearch-Hit-Select-Icon {
587584
width: 80%;
588585
margin: 0 auto;
589586
text-align: center;
590-
padding: 24px 0;
587+
padding: 36px 0;
591588
font-size: .9em;
592589
}
593590

@@ -618,8 +615,6 @@ svg.DocSearch-Hit-Select-Icon {
618615
.DocSearch-NoResults-Prefill-List li{
619616
list-style-type: '- ';
620617
list-style-position: inside;
621-
padding: 0;
622-
margin:0;
623618
}
624619

625620
.DocSearch-Prefill {
@@ -630,13 +625,13 @@ svg.DocSearch-Hit-Select-Icon {
630625
border-radius: 1em;
631626
font-size: 1em;
632627
background: none;
633-
/* background-color: var(--docsearch-muted-color); */
628+
color: var(--docsearch-primary-color);
629+
text-decoration: underline;
634630
padding: 0;
635631
}
636632

637633
.DocSearch-Prefill:hover {
638634
outline: none;
639-
color: var(--docsearch-primary-color);
640635
}
641636

642637
/* Responsive */

0 commit comments

Comments
 (0)