diff --git a/packages/react/src/components/UIShell/SideNavMenuItem.tsx b/packages/react/src/components/UIShell/SideNavMenuItem.tsx index e310c5d06784..cdc7ca861638 100644 --- a/packages/react/src/components/UIShell/SideNavMenuItem.tsx +++ b/packages/react/src/components/UIShell/SideNavMenuItem.tsx @@ -7,12 +7,12 @@ import cx from 'classnames'; import PropTypes from 'prop-types'; -import React, { ElementType, ForwardedRef, HTMLAttributes, Ref } from 'react'; +import React, { ElementType, ForwardedRef, Ref, ComponentProps } from 'react'; import SideNavLinkText from './SideNavLinkText'; import Link from './Link'; import { usePrefix } from '../../internal/usePrefix'; -interface SideNavMenuItemProps extends HTMLAttributes { +interface SideNavMenuItemProps extends ComponentProps { /** * Specify the children to be rendered inside of the `SideNavMenuItem` */ @@ -39,13 +39,7 @@ interface SideNavMenuItemProps extends HTMLAttributes { const SideNavMenuItem = React.forwardRef( function SideNavMenuItem(props, ref: ForwardedRef) { const prefix = usePrefix(); - const { - children, - className: customClassName, - isActive, - href, - ...rest - } = props; + const { children, className: customClassName, isActive, ...rest } = props; const className = cx(`${prefix}--side-nav__menu-item`, customClassName); const linkClassName = cx({ [`${prefix}--side-nav__link`]: true, @@ -54,11 +48,7 @@ const SideNavMenuItem = React.forwardRef( return (
  • - }> + }> {children}