From 06790fdd00e93043fc3bc918d1172c4b30e32bdc Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 23 Apr 2021 09:13:26 +0100 Subject: [PATCH] Rename the iframeDocument prop --- packages/block-editor/src/components/block-controls/fill.js | 2 +- .../src/components/block-settings-menu-controls/index.js | 2 +- packages/block-editor/src/components/iframe/index.js | 2 +- .../src/components/inspector-advanced-controls/index.js | 2 +- .../block-editor/src/components/inspector-controls/index.js | 2 +- packages/components/src/style-provider/index.js | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/block-controls/fill.js b/packages/block-editor/src/components/block-controls/fill.js index ce5e94b10be69..2392c3d07ee3a 100644 --- a/packages/block-editor/src/components/block-controls/fill.js +++ b/packages/block-editor/src/components/block-controls/fill.js @@ -29,7 +29,7 @@ export default function BlockControlsFill( { const Fill = groups[ group ].Fill; return ( - + { ( fillProps ) => { // Children passed to BlockControlsFill will not have access to any diff --git a/packages/block-editor/src/components/block-settings-menu-controls/index.js b/packages/block-editor/src/components/block-settings-menu-controls/index.js index 51cbe02477b24..4279b307f7e80 100644 --- a/packages/block-editor/src/components/block-settings-menu-controls/index.js +++ b/packages/block-editor/src/components/block-settings-menu-controls/index.js @@ -72,7 +72,7 @@ const BlockSettingsMenuControlsSlot = ( { fillProps, clientIds = null } ) => { */ function BlockSettingsMenuControls( { ...props } ) { return ( - + ); diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 40e677aedd228..2485c35347033 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -185,7 +185,7 @@ function Iframe( { contentRef, children, head, headHTML, ...props }, ref ) { > { iframeDocument && createPortal( - + { children } , iframeDocument.body diff --git a/packages/block-editor/src/components/inspector-advanced-controls/index.js b/packages/block-editor/src/components/inspector-advanced-controls/index.js index 6a23a5e72b981..4ed9b6341142d 100644 --- a/packages/block-editor/src/components/inspector-advanced-controls/index.js +++ b/packages/block-editor/src/components/inspector-advanced-controls/index.js @@ -17,7 +17,7 @@ const { Fill, Slot } = createSlotFill( name ); function InspectorAdvancedControls( { children } ) { const { isSelected } = useBlockEditContext(); return isSelected ? ( - + { children } ) : null; diff --git a/packages/block-editor/src/components/inspector-controls/index.js b/packages/block-editor/src/components/inspector-controls/index.js index 6d985ad910e07..9a6cb7bab61a7 100644 --- a/packages/block-editor/src/components/inspector-controls/index.js +++ b/packages/block-editor/src/components/inspector-controls/index.js @@ -15,7 +15,7 @@ const { Fill, Slot } = createSlotFill( 'InspectorControls' ); function InspectorControls( { children } ) { return useDisplayBlockControls() ? ( - + { children } ) : null; diff --git a/packages/components/src/style-provider/index.js b/packages/components/src/style-provider/index.js index 0f57ce8945edb..9cf9929389712 100644 --- a/packages/components/src/style-provider/index.js +++ b/packages/components/src/style-provider/index.js @@ -9,12 +9,12 @@ const memoizedCreateCacheWithContainer = memoize( ( container ) => { return createCache( { container } ); } ); -export default function StyleProvider( { children, iframeDocument } ) { - if ( ! iframeDocument ) { +export default function StyleProvider( { children, document } ) { + if ( ! document ) { return null; } - const cache = memoizedCreateCacheWithContainer( iframeDocument.head ); + const cache = memoizedCreateCacheWithContainer( document.head ); return { children }; }