@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
52 lines (51 loc) • 1.81 kB
TypeScript
/**
* MSKCC 2021, 2023
*/
/**
*
* TODO:
* Child for flexibility
*/
import React from 'react';
import PropTypes from 'prop-types';
export type HeaderNavItemProps = {
/**
* This prop allows you to specify the type of element that the navigation item should render as. It defaults to an anchor (<a>) element if not provided.
*/
as?: React.ElementType;
/**
* This is the text or label that should be displayed within the navigation item.
*/
label?: React.ReactNode;
/**
* This prop allows you to provide custom content as children for the navigation item.
* If this prop is provided, it will be rendered as the content of the navigation item instead of the default label.
*/
children?: React.ReactNode;
className?: string;
/**
* This prop is a boolean value that determines whether the navigation item should be marked as "active" or not.
*/
active?: boolean;
/**
* This is the URL or link that the navigation item should point to.
*/
url?: string;
/**
* This prop allows you to specify the name of the URL property to use. Default is 'href'.
*/
urlPropName?: string;
};
export declare function HeaderNavItem({ as, active, className, url, children, label, urlPropName, }: HeaderNavItemProps): JSX.Element;
export declare namespace HeaderNavItem {
var displayName: string;
var propTypes: {
active: PropTypes.Requireable<boolean>;
as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
className: PropTypes.Requireable<string>;
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
url: PropTypes.Requireable<string>;
urlPropName: PropTypes.Requireable<string>;
};
}