UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

25 lines (24 loc) 600 B
/** * Access the `<Nav>` context * * @returns an object containing: * - bool `sideCollapsed` * - function `setSideCollapsed(bool)` * - bool `mobileOpen` * - function `setMobileOpen(bool)` * - bool `isMobile` * * @see https://bifrost.intility.com/react/useNav * * @example * const { * sideCollapsed // `true` if the <Nav> ancestor sidebar is collapsed * } = useNav(); */ export default function useNav(): { sideCollapsed: boolean; setSideCollapsed?: (collapsed: boolean) => void; mobileOpen: boolean; setMobileOpen: (open: boolean) => void; isMobile: boolean; };