From edb8f055dda3c58c3971241b7c0485f37345e971 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 15 Dec 2020 19:09:26 +0100 Subject: [PATCH] devtools: Display shortcuts for prev/next search result --- .../src/devtools/views/Button.js | 4 ++-- .../src/devtools/views/Components/SearchInput.js | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/react-devtools-shared/src/devtools/views/Button.js b/packages/react-devtools-shared/src/devtools/views/Button.js index c6d2525c0b784..0d706fc2ebd6b 100644 --- a/packages/react-devtools-shared/src/devtools/views/Button.js +++ b/packages/react-devtools-shared/src/devtools/views/Button.js @@ -16,14 +16,14 @@ import tooltipStyles from './Tooltip.css'; type Props = { children: React$Node, className?: string, - title?: string, + title: React$Node, ... }; export default function Button({ children, className = '', - title = '', + title, ...rest }: Props) { let button = ( diff --git a/packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js b/packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js index a36009fc767ca..0fe2ccaa78ea3 100644 --- a/packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js +++ b/packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js @@ -95,14 +95,23 @@ export default function SearchInput(props: Props) { className={styles.IconButton} disabled={!searchText} onClick={() => dispatch({type: 'GO_TO_PREVIOUS_SEARCH_RESULT'})} - title="Scroll to previous search result"> + title={ + + Scroll to previous search result (Shift +{' '} + Enter) + + }>