| 1 |
/// <reference types="react" /> |
| 2 |
import { NavSelectClickHandler } from './Nav'; |
| 3 |
import { OUIAProps } from '../../helpers'; |
| 4 |
export interface NavItemProps extends Omit<React.HTMLProps<HTMLAnchorElement>, 'onClick'>, OUIAProps { |
| 5 |
/** Content rendered inside the nav item. */ |
| 6 |
children?: React.ReactNode; |
| 7 |
/** Whether to set className on children when React.isValidElement(children) */ |
| 8 |
styleChildren?: boolean; |
| 9 |
/** Additional classes added to the nav item */ |
| 10 |
className?: string; |
| 11 |
/** Target navigation link. Should not be used if the flyout prop is defined. */ |
| 12 |
to?: string; |
| 13 |
/** Flag indicating whether the item is active */ |
| 14 |
isActive?: boolean; |
| 15 |
/** Group identifier, will be returned with the onToggle and onSelect callback passed to the Nav component */ |
| 16 |
groupId?: string | number | null; |
| 17 |
/** Item identifier, will be returned with the onToggle and onSelect callback passed to the Nav component */ |
| 18 |
itemId?: string | number | null; |
| 19 |
/** If true prevents the default anchor link action to occur. Set to true if you want to handle navigation yourself. */ |
| 20 |
preventDefault?: boolean; |
| 21 |
/** Callback for item click */ |
| 22 |
onClick?: NavSelectClickHandler; |
| 23 |
/** Component used to render NavItems if React.isValidElement(children) is false */ |
| 24 |
component?: React.ElementType<any> | React.ComponentType<any>; |
| 25 |
/** Flyout of a nav item. This should be a Menu component. Should not be used if the to prop is defined. */ |
| 26 |
flyout?: React.ReactElement<any>; |
| 27 |
/** Callback when flyout is opened or closed */ |
| 28 |
onShowFlyout?: () => void; |
| 29 |
/** z-index of the flyout nav item */ |
| 30 |
zIndex?: number; |
| 31 |
/** Icon added before the nav item children. */ |
| 32 |
icon?: React.ReactNode; |
| 33 |
/** Value to overwrite the randomly generated data-ouia-component-id.*/ |
| 34 |
ouiaId?: number | string; |
| 35 |
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */ |
| 36 |
ouiaSafe?: boolean; |
| 37 |
/** React ref for the anchor element within the nav item. */ |
| 38 |
anchorRef?: React.Ref<HTMLAnchorElement>; |
| 39 |
/** @hide Forwarded ref */ |
| 40 |
innerRef?: React.Ref<HTMLLIElement>; |
| 41 |
} |
| 42 |
export declare const NavItem: import("react").ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>; |
| 43 |
//# sourceMappingURL=NavItem.d.ts.map |