Skip to content

Commit 20c6a7e

Browse files
committed
devtools: Display shortcuts for prev/next search result
1 parent be178ea commit 20c6a7e

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

packages/react-devtools-shared/src/devtools/views/Button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import tooltipStyles from './Tooltip.css';
1616
type Props = {
1717
children: React$Node,
1818
className?: string,
19-
title?: string,
19+
title: React$Node,
2020
...
2121
};
2222

2323
export default function Button({
2424
children,
2525
className = '',
26-
title = '',
26+
title,
2727
...rest
2828
}: Props) {
2929
let button = (

packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,22 @@ export default function SearchInput(props: Props) {
9595
className={styles.IconButton}
9696
disabled={!searchText}
9797
onClick={() => dispatch({type: 'GO_TO_PREVIOUS_SEARCH_RESULT'})}
98-
title="Scroll to previous search result">
98+
title={
99+
<React.Fragment>
100+
Scroll to previous search result (<kbd>Shift</kbd> + <kbd>Enter</kbd>)
101+
</React.Fragment>
102+
}>
99103
<ButtonIcon type="up" />
100104
</Button>
101105
<Button
102106
className={styles.IconButton}
103107
disabled={!searchText}
104108
onClick={() => dispatch({type: 'GO_TO_NEXT_SEARCH_RESULT'})}
105-
title="Scroll to next search result">
109+
title={
110+
<React.Fragment>
111+
Scroll to next search result (<kbd>Enter</kbd>)
112+
</React.Fragment>
113+
}>
106114
<ButtonIcon type="down" />
107115
</Button>
108116
<Button

0 commit comments

Comments
 (0)