@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
33 lines (32 loc) • 1.32 kB
JavaScript
"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from "react";
import classnames from "classnames";
import Branding from "./Branding.internal.js";
import NavLocationProvider from "./NavLocationContext.internal.js";
/**
* Full-screen fixed mobile nav
*/ const NavMobile = /*#__PURE__*/ forwardRef(({ children, className, onOverlayClick, hideBranding = false, ...props }, ref)=>/*#__PURE__*/ _jsxs(NavLocationProvider, {
where: "mobile",
sideExpandedOrMobile: true,
children: [
/*#__PURE__*/ _jsxs("nav", {
...props,
className: classnames("bf-nav bf-nav-mobile bf-scrollbar-small", className),
ref: ref,
children: [
/*#__PURE__*/ _jsx("div", {
className: "bf-nav-mobile-content",
children: children
}),
!hideBranding && /*#__PURE__*/ _jsx(Branding, {})
]
}),
onOverlayClick && /*#__PURE__*/ _jsx("div", {
className: classnames("bf-nav-mobile-overlay", className),
onClick: onOverlayClick
})
]
}));
NavMobile.displayName = "Nav.Mobile";
export default NavMobile;