Skip to content

Commit

Permalink
Remove computedFillProps, use fillProps directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Dec 5, 2024
1 parent f787a97 commit 07ddcb6
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/block-editor/src/components/inspector-controls/slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* WordPress dependencies
*/
import { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';
import { useMemo } from '@wordpress/element';
import warning from '@wordpress/warning';
import deprecated from '@wordpress/deprecated';

Expand Down Expand Up @@ -34,14 +33,6 @@ export default function InspectorControlsSlot( {
const slotFill = groups[ group ];
const fills = useSlotFills( slotFill?.name );

const computedFillProps = useMemo(
() => ( {
...fillProps,
forwardedContext: [ ...( fillProps?.forwardedContext ?? [] ) ],
} ),
[ fillProps ]
);

if ( ! slotFill ) {
warning( `Unknown InspectorControls group "${ group }" provided.` );
return null;
Expand All @@ -58,14 +49,12 @@ export default function InspectorControlsSlot( {
<BlockSupportToolsPanel group={ group } label={ label }>
<BlockSupportSlotContainer
{ ...props }
fillProps={ computedFillProps }
fillProps={ fillProps }
Slot={ Slot }
/>
</BlockSupportToolsPanel>
);
}

return (
<Slot { ...props } fillProps={ computedFillProps } bubblesVirtually />
);
return <Slot { ...props } fillProps={ fillProps } bubblesVirtually />;
}

0 comments on commit 07ddcb6

Please sign in to comment.