From 15cd871ce2c8226bd2cd9b8ccee8c842b0b0a104 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Wed, 23 Dec 2020 10:13:54 -0300 Subject: [PATCH] Allow MenuItemLink to receive TooltipPops --- packages/ra-ui-materialui/src/layout/MenuItemLink.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ra-ui-materialui/src/layout/MenuItemLink.tsx b/packages/ra-ui-materialui/src/layout/MenuItemLink.tsx index 52c57a2d066..23a32193f7b 100644 --- a/packages/ra-ui-materialui/src/layout/MenuItemLink.tsx +++ b/packages/ra-ui-materialui/src/layout/MenuItemLink.tsx @@ -12,7 +12,7 @@ import { StaticContext } from 'react-router'; import { NavLink, NavLinkProps } from 'react-router-dom'; import MenuItem, { MenuItemProps } from '@material-ui/core/MenuItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; -import Tooltip from '@material-ui/core/Tooltip'; +import Tooltip, { TooltipProps } from '@material-ui/core/Tooltip'; import { makeStyles } from '@material-ui/core/styles'; const NavLinkRef = forwardRef((props, ref) => ( @@ -40,6 +40,7 @@ const MenuItemLink: FC = forwardRef((props, ref) => { leftIcon, onClick, sidebarIsOpen, + tooltipProps, ...rest } = props; const classes = useStyles(props); @@ -78,7 +79,7 @@ const MenuItemLink: FC = forwardRef((props, ref) => { } return ( - + {renderMenuItem()} ); @@ -89,6 +90,7 @@ interface Props { primaryText?: ReactNode; staticContext?: StaticContext; sidebarIsOpen: boolean; + tooltipProps?: TooltipProps; } export type MenuItemLinkProps = Props &