ant-design/components/menu/MenuContext.tsx
2023-05-26 17:15:03 +08:00

23 lines
526 B
TypeScript

import { createContext } from 'react';
import type { DirectionType } from '../config-provider';
export type MenuTheme = 'light' | 'dark';
export interface MenuContextProps {
prefixCls: string;
inlineCollapsed: boolean;
direction?: DirectionType;
theme?: MenuTheme;
firstLevel: boolean;
/** @internal Safe to remove */
disableMenuItemTitleTooltip?: boolean;
}
const MenuContext = createContext<MenuContextProps>({
prefixCls: '',
firstLevel: true,
inlineCollapsed: false,
});
export default MenuContext;