Skip to content

Commit

Permalink
devtools: Display shortcuts for prev/next search result
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Dec 15, 2020
1 parent be178ea commit edb8f05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-devtools-shared/src/devtools/views/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={
<React.Fragment>
Scroll to previous search result (<kbd>Shift</kbd> +{' '}
<kbd>Enter</kbd>)
</React.Fragment>
}>
<ButtonIcon type="up" />
</Button>
<Button
className={styles.IconButton}
disabled={!searchText}
onClick={() => dispatch({type: 'GO_TO_NEXT_SEARCH_RESULT'})}
title="Scroll to next search result">
title={
<React.Fragment>
Scroll to next search result (<kbd>Enter</kbd>)
</React.Fragment>
}>
<ButtonIcon type="down" />
</Button>
<Button
Expand Down

0 comments on commit edb8f05

Please sign in to comment.