carbon-react 111.7.0 → 111.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,6 +32,7 @@ const MenuItem = ({
|
|
|
32
32
|
onSubmenuOpen,
|
|
33
33
|
onSubmenuClose,
|
|
34
34
|
overrideColor,
|
|
35
|
+
rel,
|
|
35
36
|
...rest
|
|
36
37
|
}) => {
|
|
37
38
|
const menuContext = useContext(MenuContext);
|
|
@@ -91,6 +92,7 @@ const MenuItem = ({
|
|
|
91
92
|
className: classes,
|
|
92
93
|
href,
|
|
93
94
|
target,
|
|
95
|
+
rel,
|
|
94
96
|
onClick: onClick || (isChildSearch.current ? updateFocusOnClick : undefined),
|
|
95
97
|
icon,
|
|
96
98
|
selected,
|
|
@@ -211,6 +213,9 @@ MenuItem.propTypes = {
|
|
|
211
213
|
/** The target to use for the menu item. */
|
|
212
214
|
target: PropTypes.string,
|
|
213
215
|
|
|
216
|
+
/** The rel attribute to be used for the underlying <a> tag */
|
|
217
|
+
rel: PropTypes.string,
|
|
218
|
+
|
|
214
219
|
/** Flag to display the dropdown arrow when an item has a submenu */
|
|
215
220
|
showDropdownArrow: PropTypes.bool,
|
|
216
221
|
|
|
@@ -19,6 +19,8 @@ export interface MenuItemBaseProps extends LayoutProps, FlexboxProps {
|
|
|
19
19
|
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
20
20
|
/** The target to use for the menu item. */
|
|
21
21
|
target?: string;
|
|
22
|
+
/** The rel attribute to be used for the underlying <a> tag */
|
|
23
|
+
rel?: string;
|
|
22
24
|
/** set the colour variant for a menuType */
|
|
23
25
|
variant?: "default" | "alternate";
|
|
24
26
|
/** Flag to display the dropdown arrow when an item has a submenu */
|
|
@@ -56,6 +56,7 @@ const MenuItem = ({
|
|
|
56
56
|
onSubmenuOpen,
|
|
57
57
|
onSubmenuClose,
|
|
58
58
|
overrideColor,
|
|
59
|
+
rel,
|
|
59
60
|
...rest
|
|
60
61
|
}) => {
|
|
61
62
|
const menuContext = (0, _react.useContext)(_menu.default);
|
|
@@ -117,6 +118,7 @@ const MenuItem = ({
|
|
|
117
118
|
className: classes,
|
|
118
119
|
href,
|
|
119
120
|
target,
|
|
121
|
+
rel,
|
|
120
122
|
onClick: onClick || (isChildSearch.current ? updateFocusOnClick : undefined),
|
|
121
123
|
icon,
|
|
122
124
|
selected,
|
|
@@ -237,6 +239,9 @@ MenuItem.propTypes = {
|
|
|
237
239
|
/** The target to use for the menu item. */
|
|
238
240
|
target: _propTypes.default.string,
|
|
239
241
|
|
|
242
|
+
/** The rel attribute to be used for the underlying <a> tag */
|
|
243
|
+
rel: _propTypes.default.string,
|
|
244
|
+
|
|
240
245
|
/** Flag to display the dropdown arrow when an item has a submenu */
|
|
241
246
|
showDropdownArrow: _propTypes.default.bool,
|
|
242
247
|
|
|
@@ -19,6 +19,8 @@ export interface MenuItemBaseProps extends LayoutProps, FlexboxProps {
|
|
|
19
19
|
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
20
20
|
/** The target to use for the menu item. */
|
|
21
21
|
target?: string;
|
|
22
|
+
/** The rel attribute to be used for the underlying <a> tag */
|
|
23
|
+
rel?: string;
|
|
22
24
|
/** set the colour variant for a menuType */
|
|
23
25
|
variant?: "default" | "alternate";
|
|
24
26
|
/** Flag to display the dropdown arrow when an item has a submenu */
|