UNPKG

@octopusdeploy/design-system-components

Version:
22 lines (21 loc) 993 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SideNavBarLogo = SideNavBarLogo; const jsx_runtime_1 = require("react/jsx-runtime"); const css_1 = require("@emotion/css"); const react_1 = require("react"); const OctopusRoutingContext_1 = require("../../routing/OctopusRoutingContext"); const resetStyles_1 = require("../../utils/resetStyles"); function SideNavBarLogo({ icon, href, accessibleName }) { const Link = (0, OctopusRoutingContext_1.useOctopusLinkComponent)(); const linkRef = (0, react_1.useRef)(null); return ((0, jsx_runtime_1.jsx)(Link, { ref: linkRef, className: sideNavBarLogoStyles, href: href, "aria-label": accessibleName, disableImplicitEventTracking: true, children: icon })); } const sideNavBarLogoStyles = (0, css_1.cx)((0, css_1.css)(resetStyles_1.resetStyles.anchor, { display: "flex", flexDirection: "column", width: "100%", alignItems: "center", justifyContent: "center", height: "4rem", }));