Commit 8e711f9 1 parent b1a871d commit 8e711f9 Copy full SHA for 8e711f9
File tree 1 file changed +20
-7
lines changed
packages/components/src/toolbar/toolbar
1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,18 @@ import deprecated from '@wordpress/deprecated';
16
16
import ToolbarGroup from '../toolbar-group' ;
17
17
import ToolbarContainer from './toolbar-container' ;
18
18
import type { ToolbarProps } from './types' ;
19
- import type { WordPressComponentProps } from '../../ui/context' ;
19
+ import {
20
+ WordPressComponentProps ,
21
+ ContextSystemProvider ,
22
+ } from '../../ui/context' ;
23
+
24
+ const CONTEXT_SYSTEM_VALUE = {
25
+ DropdownMenu : {
26
+ // Note: the legacy `DropdownMenu` component is not yet reactive to this
27
+ // context variant. See https://github.com/WordPress/gutenberg/pull/51097.
28
+ variant : 'toolbar' ,
29
+ } ,
30
+ } ;
20
31
21
32
function UnforwardedToolbar (
22
33
{
@@ -40,12 +51,14 @@ function UnforwardedToolbar(
40
51
className
41
52
) ;
42
53
return (
43
- < ToolbarContainer
44
- className = { finalClassName }
45
- label = { label }
46
- ref = { ref }
47
- { ...props }
48
- />
54
+ < ContextSystemProvider value = { CONTEXT_SYSTEM_VALUE } >
55
+ < ToolbarContainer
56
+ className = { finalClassName }
57
+ label = { label }
58
+ ref = { ref }
59
+ { ...props }
60
+ />
61
+ </ ContextSystemProvider >
49
62
) ;
50
63
}
51
64
You can’t perform that action at this time.
0 commit comments