ant-design/components/menu/MenuContext.tsx
二货机器人 f1e0c9c1d2
chore: Internal Menu interface for ProLayout usage (#33399)
* test: Update snapshot

* chore: disable tooltip

* chore: rename
2021-12-24 10:57:35 +08:00

23 lines
544 B
TypeScript

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;
/** @private Internal Usage. Safe to remove */
disableMenuItemTitleTooltip?: boolean;
}
const MenuContext = createContext<MenuContextProps>({
prefixCls: '',
firstLevel: true,
inlineCollapsed: false,
});
export default MenuContext;