@octopusdeploy/design-system-components
Version:
The design systems component library.
18 lines (17 loc) • 749 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NavigationBarItem = NavigationBarItem;
const jsx_runtime_1 = require("react/jsx-runtime");
const type_utils_1 = require("@octopusdeploy/type-utils");
const NavigationBarLink_1 = require("./NavigationBarLink");
function NavigationBarItem({ item }) {
const { type } = item;
switch (type) {
case "link":
return (0, jsx_runtime_1.jsx)(NavigationBarLink_1.NavigationBarLink, { label: item.label, href: item.href, showLinkAsActive: item.showLinkAsActive });
case "custom":
return item.content;
default:
(0, type_utils_1.exhaustiveCheck)(type, `Unsupported navigation bar item type "${type}"`);
}
}