Private
Public Access
1
0
Files

35 lines
1006 B
JavaScript

'use client';
import * as React from 'react';
const navContextDefaultValue = {
selectedValue: undefined,
selectedCategoryValue: undefined,
onRegister: ()=>{
/* noop */ },
onUnregister: ()=>{
/* noop */ },
onSelect: ()=>{
/* noop */ },
getRegisteredNavItems: ()=>{
return {
registeredNavItems: {}
};
},
onRequestNavCategoryItemToggle () {
/* noop */ },
/**
* The list of opened panels by index
*/ openCategories: [],
/**
* Indicates if Nav supports multiple open Categories at the same time.
*/ multiple: true,
/**
* Indicates the vertical density and density of the Nav.
*/ density: 'medium',
/**
* By default, the Nav is a single tab stop with only arrow key navigation
*/ tabbable: false
};
const NavContext = React.createContext(undefined);
export const NavProvider = NavContext.Provider;
export const useNavContext_unstable = ()=>React.useContext(NavContext) || navContextDefaultValue;