Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace close button label by a gridicon
  • Loading branch information
keoshi committed Jan 20, 2020
commit 8df1b37a74d6192f223e37778caf519dcd10ad8e
8 changes: 6 additions & 2 deletions modules/search/instant-search/components/overlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/
import { h } from 'preact';
import { useEffect } from 'preact/hooks';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import Gridicon from './gridicon';

const closeOnEscapeKey = callback => event => {
event.key === 'Escape' && callback();
Expand All @@ -28,7 +32,7 @@ const Overlay = ( { isVisible, closeOverlay, children } ) => {
return (
<div className={ classNames.join( ' ' ) }>
<button className="jetpack-instant-search__overlay-close" onClick={ closeOverlay }>
{ __( 'Close', 'jetpack' ) }
<Gridicon icon="cross" size="24" />
</button>
{ children }
</div>
Expand Down