@octopusdeploy/design-system-components
Version:
The design systems component library.
45 lines (44 loc) • 1.97 kB
TypeScript
import type React from "react";
import type { NavigationBarActionData } from "./NavigationBarActions";
import { NavigationBarButton } from "./NavigationBarButton";
import { NavigationBarIconButton } from "./NavigationBarIconButton";
import { NavigationBarIconLink } from "./NavigationBarIconLink";
import type { NavigationBarItemData } from "./NavigationBarItem";
export interface NavigationBarProps {
/**
* A custom react element to use for the logo.
* This is positioned on the left of the navigation bar and is displayed on all screen sizes.
*
* @example
* <NavigationBar logo={<MyLogo />} items={[...]} />
*/
logo?: React.ReactElement;
/**
* The items to display in the navigation bar.
* These can either be links, or custom react elements.
*
* Any items that cannot fit in the available width will be collapsed into a `More` dropdown button.
*/
items: NavigationBarItemData[];
/**
* The actions to display in the navigation bar.
*/
actions?: NavigationBarActionData[];
}
/**
* The NavigationBar component is used to display a navigation bar with a logo, items, and actions.
* It is responsive and will display a mobile version of the navigation bar on smaller screens.
* It is currently used exclusively in the Control Centre.
*
* @param props - The props for the NavigationBar component.
* @param props.logo - The logo to display in the navigation bar.
* @param props.items - The items to display in the navigation bar.
* @param props.actions - The actions to display in the navigation bar.
* @returns The NavigationBar component.
*/
export declare function NavigationBar({ logo, items, actions }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
export declare namespace NavigationBar {
export { NavigationBarButton as Button };
export { NavigationBarIconButton as DeprecatedIconButton };
export { NavigationBarIconLink as IconLink };
}