@moderneinc/design-system-components 7.1.0-next.b16a41 → 7.1.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.
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1804,7 +1804,7 @@ const StyledMenuItem = styled(MenuItem)(({ theme }) => ({
|
|
|
1804
1804
|
borderRadius: 0,
|
|
1805
1805
|
color: semanticColors.color.icon.default,
|
|
1806
1806
|
textDecoration: 'none',
|
|
1807
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.
|
|
1807
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.caption),
|
|
1808
1808
|
fontWeight: typography.fontWeight.regular,
|
|
1809
1809
|
lineHeight: '20px',
|
|
1810
1810
|
transition: theme.transitions.create(['background-color'], {
|
|
@@ -1824,6 +1824,7 @@ const StyledMenuItem = styled(MenuItem)(({ theme }) => ({
|
|
|
1824
1824
|
},
|
|
1825
1825
|
[`&.${menuItemClasses.focusVisible}`]: {
|
|
1826
1826
|
backgroundColor: semanticColors.color.surface.rowHover,
|
|
1827
|
+
outline: 'none',
|
|
1827
1828
|
},
|
|
1828
1829
|
}));
|
|
1829
1830
|
const MenuItemContent = styled('div')({
|
|
@@ -1901,7 +1902,11 @@ function ModMenuItem({ icon, shortcut, secondaryText, children, component, href,
|
|
|
1901
1902
|
// root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
|
|
1902
1903
|
// an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
|
|
1903
1904
|
// unless the caller named a component (e.g. a router link) themselves.
|
|
1904
|
-
const rootProps = {
|
|
1905
|
+
const rootProps = {
|
|
1906
|
+
...rest,
|
|
1907
|
+
href,
|
|
1908
|
+
component: component ?? (href ? 'a' : undefined),
|
|
1909
|
+
};
|
|
1905
1910
|
return (jsx(StyledMenuItem, { ...rootProps, children: jsxs(MenuItemContent, { children: [icon && jsx(IconWrapper$1, { children: icon }), jsxs(LabelContainer$3, { children: [jsx(Label$3, { children: children }), secondaryText && jsx(SecondaryLabel, { children: secondaryText })] }), shortcut && jsx(Shortcut, { children: shortcut })] }) }));
|
|
1906
1911
|
}
|
|
1907
1912
|
ModMenuItem.displayName = 'ModMenuItem';
|