Skip to content

Commit

Permalink
Make useZoomOut hook private (#66374)
Browse files Browse the repository at this point in the history
Co-authored-by: jeryj <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Oct 23, 2024
1 parent a775b7c commit b0db4f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
8 changes: 0 additions & 8 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,14 +1075,6 @@ _Parameters_
- _override.id_ `?string`: Id of the style override, leave blank to create a new style.
- _override.css_ `string`: CSS to apply.

### useZoomOut

A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode.

_Parameters_

- _zoomOut_ `boolean`: If we should enter into zoomOut mode or not

### Warning

_Related_
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export {
getGapCSSValue as __experimentalGetGapCSSValue,
getShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,
useCachedTruthy,
useZoomOut,
useStyleOverride,
} from './hooks';
export * from './components';
Expand Down
2 changes: 2 additions & 0 deletions packages/block-editor/src/private-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
useLayoutClasses,
useLayoutStyles,
__unstableBlockStyleVariationOverridesWithConfig,
useZoomOut,
} from './hooks';
import DimensionsTool from './components/dimensions-tool';
import ResolutionTool from './components/resolution-tool';
Expand Down Expand Up @@ -79,6 +80,7 @@ lock( privateApis, {
TextAlignmentControl,
usesContextKey,
useFlashEditableBlocks,
useZoomOut,
globalStylesDataKey,
globalStylesLinksDataKey,
selectBlockPatternsKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { Card, CardBody } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useZoomOut } from '@wordpress/block-editor';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { useDispatch } from '@wordpress/data';
import { store as editorStore } from '@wordpress/editor';

Expand All @@ -12,6 +12,9 @@ import { store as editorStore } from '@wordpress/editor';
*/
import ScreenHeader from './header';
import SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';
import { unlock } from '../../lock-unlock';

const { useZoomOut } = unlock( blockEditorPrivateApis );

function ScreenStyleVariations() {
// Style Variations should only be previewed in with
Expand Down

0 comments on commit b0db4f8

Please sign in to comment.