1
1
/**
2
2
* WordPress dependencies
3
3
*/
4
- import {
5
- __experimentalUseSlotFills as useSlotFills ,
6
- __unstableMotionContext as MotionContext ,
7
- } from '@wordpress/components' ;
8
- import { useContext , useMemo } from '@wordpress/element' ;
4
+ import { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components' ;
9
5
import warning from '@wordpress/warning' ;
10
6
import deprecated from '@wordpress/deprecated' ;
11
7
@@ -37,19 +33,6 @@ export default function InspectorControlsSlot( {
37
33
const slotFill = groups [ group ] ;
38
34
const fills = useSlotFills ( slotFill ?. name ) ;
39
35
40
- const motionContextValue = useContext ( MotionContext ) ;
41
-
42
- const computedFillProps = useMemo (
43
- ( ) => ( {
44
- ...fillProps ,
45
- forwardedContext : [
46
- ...( fillProps ?. forwardedContext ?? [ ] ) ,
47
- [ MotionContext . Provider , { value : motionContextValue } ] ,
48
- ] ,
49
- } ) ,
50
- [ motionContextValue , fillProps ]
51
- ) ;
52
-
53
36
if ( ! slotFill ) {
54
37
warning ( `Unknown InspectorControls group "${ group } " provided.` ) ;
55
38
return null ;
@@ -66,14 +49,12 @@ export default function InspectorControlsSlot( {
66
49
< BlockSupportToolsPanel group = { group } label = { label } >
67
50
< BlockSupportSlotContainer
68
51
{ ...props }
69
- fillProps = { computedFillProps }
52
+ fillProps = { fillProps }
70
53
Slot = { Slot }
71
54
/>
72
55
</ BlockSupportToolsPanel >
73
56
) ;
74
57
}
75
58
76
- return (
77
- < Slot { ...props } fillProps = { computedFillProps } bubblesVirtually />
78
- ) ;
59
+ return < Slot { ...props } fillProps = { fillProps } bubblesVirtually /> ;
79
60
}
0 commit comments