From c9273bfbca2d1fc41ec4451a530736e1a4e8bfb2 Mon Sep 17 00:00:00 2001 From: Shipow Date: Fri, 24 Apr 2020 10:52:40 +0200 Subject: [PATCH] fix(design): improvements from feedbacks - No results - Select Icon - Start screen message --- src/NoResultsScreen.tsx | 56 +++++++++++++++++++++------------------- src/StartScreen.tsx | 2 +- src/icons/SelectIcon.tsx | 2 +- src/style.css | 50 ++++++++++++++++++++++++++++------- 4 files changed, 71 insertions(+), 39 deletions(-) diff --git a/src/NoResultsScreen.tsx b/src/NoResultsScreen.tsx index 9f5ff16c..1aa0f667 100644 --- a/src/NoResultsScreen.tsx +++ b/src/NoResultsScreen.tsx @@ -10,10 +10,10 @@ import { NoResultsIcon } from './icons'; interface NoResultsScreenProps extends AutocompleteApi< - InternalDocSearchHit, - React.FormEvent, - React.MouseEvent, - React.KeyboardEvent + InternalDocSearchHit, + React.FormEvent, + React.MouseEvent, + React.KeyboardEvent > { state: AutocompleteState; inputRef: React.MutableRefObject; @@ -26,43 +26,45 @@ export function NoResultsScreen(props: NoResultsScreenProps) { return (
- +

No results for "{props.state.query}".

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

- Try searching for{' '} - {searchSuggestions.slice(0, 3).reduce( - (acc, search) => [ - ...acc, - , - ], - [] - )} -

+
+

Try searching for:

+
    + {searchSuggestions.slice(0, 3).reduce( + (acc, search) => [ + ...acc, +
  • , + ], + [] + )} +
+
)}

- If you believe this query should return results, please{' '} + You believe this query should return results?{' '} - let us know on GitHub + Let us know .

diff --git a/src/StartScreen.tsx b/src/StartScreen.tsx index 12bc73aa..11f36787 100644 --- a/src/StartScreen.tsx +++ b/src/StartScreen.tsx @@ -27,7 +27,7 @@ export function StartScreen(props: StartScreenProps) { if (props.state.status === 'idle' && props.hasSuggestions === false) { return (
-

Your search history will appear here.

+

No recent searches

); } diff --git a/src/icons/SelectIcon.tsx b/src/icons/SelectIcon.tsx index c71d42f2..5d5dfbe9 100644 --- a/src/icons/SelectIcon.tsx +++ b/src/icons/SelectIcon.tsx @@ -2,7 +2,7 @@ import React from 'react'; export function SelectIcon() { return ( - +