Skip to content

Commit

Permalink
Add zoom out on pattern category selection back in
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Aug 2, 2024
1 parent c4d698c commit 119723a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import InserterSearchResults from './search-results';
import useInsertionPoint from './hooks/use-insertion-point';
import { store as blockEditorStore } from '../../store';
import TabbedSidebar from '../tabbed-sidebar';
import { useZoomOut } from '../../hooks/use-zoom-out';

const NOOP = () => {};
function InserterMenu(
Expand Down Expand Up @@ -145,6 +146,11 @@ function InserterMenu(

const showMediaPanel = selectedTab === 'media' && !! selectedMediaCategory;

const showZoomOut =
showPatternPanel && !! window.__experimentalEnableZoomedOutPatternsTab;

useZoomOut( showZoomOut );

const inserterSearch = useMemo( () => {
if ( selectedTab === 'media' ) {
return null;
Expand Down

0 comments on commit 119723a

Please sign in to comment.