Skip to content

Commit

Permalink
Make the slot private.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Apr 23, 2023
1 parent 848d03c commit b2a2a70
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
* WordPress dependencies
*/
import { Children, cloneElement, useState, useMemo } from '@wordpress/element';
import { createSlotFill, Button } from '@wordpress/components';
import {
Button,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { ESCAPE } from '@wordpress/keycodes';
import { __ } from '@wordpress/i18n';
import { useDispatch, useSelect } from '@wordpress/data';
Expand Down Expand Up @@ -31,9 +34,11 @@ export function getEditorCanvasContainerTitle( view ) {
}
}

// Creates a private slot fill.
const { createPrivateSlotFill } = unlock( componentsPrivateApis );
const SLOT_FILL_NAME = 'EditSiteEditorCanvasContainerSlot';
const { Slot: EditorCanvasContainerSlot, Fill: EditorCanvasContainerFill } =
createSlotFill( SLOT_FILL_NAME );
createPrivateSlotFill( SLOT_FILL_NAME );

function EditorCanvasContainer( {
children,
Expand Down

0 comments on commit b2a2a70

Please sign in to comment.