ant-design/components/menu/MenuContext.tsx
MadCcc d7c2f5f5d3
feat: menu theme implemented by design token (#36738)
* feat: menu theme implemented by design token

* test: fix test

* fix: lint

* fix: menu motion

* 偷偷加了几个token

Co-authored-by: 期贤 <qixian.cs@antgroup.com>
2022-07-28 20:33:10 +08:00

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