UNPKG

@carbon/react

Version:

React components for the Carbon Design System

35 lines (34 loc) 1.16 kB
/** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { ElementType, ComponentProps } from 'react'; import Link from './Link'; export type SideNavMenuItemProps = ComponentProps<typeof Link> & { /** * Specify the children to be rendered inside of the `SideNavMenuItem` */ children?: React.ReactNode; /** * Provide an optional class to be applied to the containing node */ className?: string; /** * Optionally specify whether the link is "active". An active link is one that * has an href that is the same as the current page. Can also pass in * `aria-current="page"`, as well. */ isActive?: boolean; /** * Optionally provide an href for the underlying li` */ href?: string; /** * Optional component to render instead of default Link */ as?: ElementType; }; declare const SideNavMenuItem: React.ForwardRefExoticComponent<Omit<SideNavMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>>; export default SideNavMenuItem;