-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13859 from newrelic/sunny/fix-nav-quirky
fix nav collapser quirk
- Loading branch information
Showing
4 changed files
with
48 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
import { createContext, useContext } from 'react'; | ||
|
||
export const MainLayoutContext = createContext(); | ||
/** | ||
* exposes whether the site's left nav sidebar is currently open | ||
* | ||
* @example | ||
* | ||
* ```js | ||
* const [sidebar] = useMainLayoutContext(); // true | false | ||
* ``` | ||
*/ | ||
export const useMainLayoutContext = () => useContext(MainLayoutContext); |
Oops, something went wrong.