Skip to content

Commit

Permalink
changes per review
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 24, 2020
1 parent 6aca894 commit d479589
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ function QuickInserter( {

// Announce search results on change
useEffect( () => {
if ( ! filterValue ) {
return;
}
const count = filteredBlockTypes.length + filteredBlockPatterns.length;
const resultsFoundMessage = sprintf(
/* translators: %d: number of results. */
Expand Down
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/inserter/search-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { useInstanceId } from '@wordpress/compose';
import { __ } from '@wordpress/i18n';
import { VisuallyHidden, Button } from '@wordpress/components';
import { Icon, search, close } from '@wordpress/icons';
import { Icon, search, closeSmall } from '@wordpress/icons';
import { useRef } from '@wordpress/element';

function InserterSearchForm( { onChange, value } ) {
Expand Down Expand Up @@ -37,7 +37,7 @@ function InserterSearchForm( { onChange, value } ) {
<div className="block-editor-inserter__search-icon">
{ !! value && (
<Button
icon={ close }
icon={ closeSmall }
label={ __( 'Reset search' ) }
onClick={ () => {
onChange( '' );
Expand Down

0 comments on commit d479589

Please sign in to comment.