mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
25 lines
596 B
TypeScript
25 lines
596 B
TypeScript
import { createContext } from 'react';
|
|
import type { MenuProps } from 'rc-menu';
|
|
import type { DirectionType } from '../config-provider';
|
|
|
|
export type MenuTheme = 'light' | 'dark';
|
|
|
|
export interface MenuContextProps {
|
|
prefixCls: string;
|
|
inlineCollapsed: boolean;
|
|
direction?: DirectionType;
|
|
mode?: MenuProps['mode'];
|
|
theme?: MenuTheme;
|
|
firstLevel: boolean;
|
|
/** @internal Safe to remove */
|
|
disableMenuItemTitleTooltip?: boolean;
|
|
}
|
|
|
|
const MenuContext = createContext<MenuContextProps>({
|
|
prefixCls: '',
|
|
firstLevel: true,
|
|
inlineCollapsed: false,
|
|
});
|
|
|
|
export default MenuContext;
|