@@ -74,13 +74,6 @@ const keepMountedProp = {
74
74
</ >
75
75
} ;
76
76
77
- const menuChildrenProp = {
78
- name : 'children' ,
79
- type : 'node' ,
80
- desc : < p > Can be < code > MenuDivider, MenuHeader, MenuItem, FocusableItem,
81
- MenuRadioGroup, SubMenu</ code > or any of their combinations.</ p >
82
- } ;
83
-
84
77
const onChangeProp = {
85
78
name : 'onChange' ,
86
79
type : 'function' ,
@@ -131,9 +124,35 @@ const styleProps = (target, modifiers, className, styles) => [
131
124
}
132
125
] ;
133
126
127
+ const commonMenuProps = [
128
+ {
129
+ name : 'arrow' ,
130
+ type : 'boolean' ,
131
+ desc : < p > Set < code > true</ code > to display an arrow pointing to its anchor element.</ p >
132
+ } ,
133
+ {
134
+ name : 'offsetX' ,
135
+ type : 'number' ,
136
+ defaultVal : 0 ,
137
+ desc : < p > Set the horizontal distance (in pixels) between menu and its anchor element. The value can be negative.</ p >
138
+ } ,
139
+ {
140
+ name : 'offsetY' ,
141
+ type : 'number' ,
142
+ defaultVal : 0 ,
143
+ desc : < p > Set the vertical distance (in pixels) between menu and its anchor element. The value can be negative.</ p >
144
+ } ,
145
+ {
146
+ name : 'children' ,
147
+ type : 'node' ,
148
+ desc : < p > Can be < code > MenuDivider, MenuHeader, MenuItem, FocusableItem,
149
+ MenuRadioGroup, SubMenu</ code > or any of their combinations.</ p >
150
+ }
151
+ ] ;
152
+
134
153
const menuPropsBase = [
135
154
...styleProps ( 'menu' , menuModifiers ) ,
136
- menuChildrenProp ,
155
+ ... commonMenuProps ,
137
156
{
138
157
name : 'id' ,
139
158
type : 'string | number' ,
@@ -333,8 +352,8 @@ const submenu = {
333
352
rows : [
334
353
...styleProps ( 'submenu item' , submenuModifiers ) ,
335
354
...styleProps ( 'submenu' , menuModifiers , 'menuClassName' , 'menuStyles' ) ,
355
+ ...commonMenuProps ,
336
356
keepMountedProp ,
337
- menuChildrenProp ,
338
357
onChangeProp ,
339
358
{
340
359
name : 'aria-label' ,
0 commit comments