Skip to content

Commit 839cb42

Browse files
committed
devtools: Display shortcuts for prev/next search result
1 parent c1b9f2d commit 839cb42

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

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

+2-2
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

+11-2
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,23 @@ 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> +{' '}
101+
<kbd>Enter</kbd>)
102+
</React.Fragment>
103+
}>
99104
<ButtonIcon type="up" />
100105
</Button>
101106
<Button
102107
className={styles.IconButton}
103108
disabled={!searchText}
104109
onClick={() => dispatch({type: 'GO_TO_NEXT_SEARCH_RESULT'})}
105-
title="Scroll to next search result">
110+
title={
111+
<React.Fragment>
112+
Scroll to next search result (<kbd>Enter</kbd>)
113+
</React.Fragment>
114+
}>
106115
<ButtonIcon type="down" />
107116
</Button>
108117
<Button

0 commit comments

Comments
 (0)