UNPKG

1.42 kBTypeScriptView Raw
1import { JSXElementConstructor, MouseEventHandler, ReactNode } from 'react';
2import { GroupPanelMap, TabsCustomized } from './Tabs';
3import { TabPaneProps } from './TabPane';
4import { TabsPosition } from './enum';
5export interface TabsContextValue {
6 prefixCls?: string | undefined;
7 defaultActiveKey?: string | undefined;
8 actuallyDefaultActiveKey?: string | undefined;
9 propActiveKey?: string | undefined;
10 keyboard?: boolean | undefined;
11 hideOnlyGroup?: boolean | undefined;
12 tabBarPosition?: TabsPosition | undefined;
13 customizable?: boolean | undefined;
14 customized?: TabsCustomized | undefined | null;
15 saveCustomized: (customized: TabsCustomized) => void;
16 activeKey?: string | undefined;
17 activeGroupKey?: string | undefined;
18 changeActiveKey: (activeKey: string, byGroup?: boolean) => void;
19 groupedPanelsMap: Map<string, GroupPanelMap>;
20 currentPanelMap: Map<string, TabPaneProps & {
21 type: string | JSXElementConstructor<any>;
22 }>;
23 totalPanelsMap: Map<string, TabPaneProps & {
24 type: string | JSXElementConstructor<any>;
25 }>;
26 onTabClick?: ((key: string) => void) | undefined;
27 onPrevClick?: MouseEventHandler<HTMLSpanElement> | undefined;
28 onNextClick?: MouseEventHandler<HTMLSpanElement> | undefined;
29 children?: ReactNode;
30}
31declare const TabsContext: import("react").Context<TabsContextValue>;
32export default TabsContext;
33
\No newline at end of file