2019-12-23 18:33:08 +08:00
|
|
|
import { createContext } from 'react';
|
2020-11-04 14:12:45 +08:00
|
|
|
import { DirectionType } from '../config-provider';
|
2019-07-22 21:15:48 +08:00
|
|
|
|
|
|
|
export type MenuTheme = 'light' | 'dark';
|
|
|
|
|
|
|
|
export interface MenuContextProps {
|
2021-05-07 17:23:05 +08:00
|
|
|
prefixCls: string;
|
2019-07-22 21:15:48 +08:00
|
|
|
inlineCollapsed: boolean;
|
|
|
|
antdMenuTheme?: MenuTheme;
|
2020-11-04 14:12:45 +08:00
|
|
|
direction?: DirectionType;
|
2021-05-07 17:23:05 +08:00
|
|
|
firstLevel: boolean;
|
2021-12-24 10:57:35 +08:00
|
|
|
/** @private Internal Usage. Safe to remove */
|
|
|
|
disableMenuItemTitleTooltip?: boolean;
|
2019-07-22 21:15:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const MenuContext = createContext<MenuContextProps>({
|
2021-05-07 17:23:05 +08:00
|
|
|
prefixCls: '',
|
|
|
|
firstLevel: true,
|
2019-07-22 21:15:48 +08:00
|
|
|
inlineCollapsed: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default MenuContext;
|