@codecademy/gamut
73.3.073.3.1-alpha.0e5de6.0
dist/Menu/MenuItem.js~
dist/Menu/MenuItem.jsModified+6−6
Index: package/dist/Menu/MenuItem.js
===================================================================
--- package/dist/Menu/MenuItem.js
+++ package/dist/Menu/MenuItem.js
@@ -1,9 +1,9 @@
import isString from 'lodash/isString';
import { forwardRef, useId } from 'react';
import { FlexBox } from '../Box';
import { Text } from '../Typography';
-import { ListButton, ListItem, ListLink, MenuToolTipWrapper } from './elements';
+import { MenuListButton, MenuListItem, MenuListLink, MenuToolTipWrapper } from './elements';
import { useMenuContext } from './MenuContext';
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
const getListItemType = (href, onClick) => href ? 'link' : onClick ? 'button' : 'item';
const activePropnames = {
@@ -78,14 +78,14 @@
children: [currentItemText[listItemType], ","]
}), children]
});
if (listItemType === 'link' && !disabled) {
- return /*#__PURE__*/_jsx(ListItem, {
+ return /*#__PURE__*/_jsx(MenuListItem, {
...listItemProps,
children: /*#__PURE__*/_jsx(MenuToolTipWrapper, {
label: label,
tipId: tipId,
- children: /*#__PURE__*/_jsx(ListLink, {
+ children: /*#__PURE__*/_jsx(MenuListLink, {
...computed,
href: href,
ref: narrowMenuItemRef(ref),
target: target,
@@ -95,15 +95,15 @@
});
}
if (listItemType === 'button' || listItemType === 'link' && disabled) {
const handleClick = disabled ? () => null : props.onClick;
- return /*#__PURE__*/_jsx(ListItem, {
+ return /*#__PURE__*/_jsx(MenuListItem, {
...listItemProps,
children: /*#__PURE__*/_jsx(MenuToolTipWrapper, {
closeOnClick: closeOnClick,
label: label,
tipId: tipId,
- children: /*#__PURE__*/_jsx(ListButton, {
+ children: /*#__PURE__*/_jsx(MenuListButton, {
...computed,
ref: narrowMenuItemRef(ref),
onClick: handleClick,
children: content
@@ -113,9 +113,9 @@
}
return (
/*#__PURE__*/
// These are non-interactive and will never have tooltips (nor should they).
- _jsx(ListItem, {
+ _jsx(MenuListItem, {
...computed,
ref: narrowMenuItemRef(ref),
children: content
})