ant-design/components/menu/MenuContext.tsx

21 lines
454 B
TypeScript
Raw Normal View History

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