UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 3.26 kB
define([], function() { return "import * as React from 'react';\n\nexport interface INav {\n /**\n * The meta 'key' property of the currently selected NavItem of the Nav. Can return\n * undefined if the currently selected nav item has no populated key property. Be aware\n * that in order for Nav to properly understand which key is selected all NavItems in\n * all groups of the Nav must have populated key properties.\n */\n selectedKey: string;\n}\n\nexport interface INavProps {\n /**\n * A collection of link groups to display in the navigation bar\n */\n groups: INavLinkGroup[];\n\n /**\n * Used to customize how content inside the link tag is rendered\n * @defaultvalue Default link rendering\n */\n onRenderLink?: Function;\n\n /**\n * Function callback invoked when a link in the navigation is clicked\n */\n onLinkClick?: (ev?: React.MouseEvent<HTMLElement>, item?: INavLink) => void;\n\n /**\n * Indicates whether the navigation component renders on top of other content in the UI\n */\n isOnTop?: boolean;\n\n /**\n * (Optional) The key of the nav item initially selected.\n */\n initialSelectedKey?: string;\n /**\n * (Optional) The nav container aria label.\n */\n ariaLabel?: string;\n\n /**\n * (Optional) The alt text for the expanded state\n **/\n expandedStateText?: string;\n\n /**\n * (Optional) The alt text for the collapsed state text\n **/\n collapsedStateText?: string;\n}\n\nexport interface INavLinkGroup {\n /**\n * Text to render as the header of a group\n */\n name?: string;\n\n /**\n * Links to render within this group\n */\n links: INavLink[];\n\n /**\n * The name to use for functional automation tests\n */\n automationId?: string;\n}\n\nexport interface INavLink {\n /**\n * Text to render for this link\n */\n name: string;\n\n /**\n * URL to navigate to for this link\n */\n url: string;\n\n /**\n * Child links to this link, if any\n */\n links?: INavLink[];\n\n /**\n * Function callback invoked when a link in the navigation is clicked\n */\n onClick?: (ev?: React.MouseEvent<HTMLElement>, item?: INavLink) => void;\n\n /**\n * button icon name if applied\n */\n icon?: string;\n\n /**\n * Classname to apply to the icon link.\n */\n iconClassName?: string;\n\n /**\n * The name of the item to be used in logging engagement data\n */\n engagementName?: string;\n\n /**\n * The alt text for the item\n */\n altText?: string;\n\n /**\n * The name to use for functional automation tests\n */\n automationId?: string;\n\n /**\n * Whether or not the link is in an expanded state\n */\n isExpanded?: boolean;\n\n /**\n * Aria label for nav link\n */\n ariaLabel?: string;\n\n /**\n * Meta info for the link, does not involving rendering.\n */\n key?: string;\n\n /**\n * title for tooltip or description\n */\n title?: string;\n\n /**\n * Link <a> target.\n */\n target?: string;\n\n /**\n * Point to the parent node key. This is used in EditNav when move node from sublink to\n * parent lin vs vers.\n */\n parentId?: string;\n\n /**\n * Any additional properties to apply to the rendered links.\n */\n [propertyName: string]: any;\n}\n"; });