choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
39 lines (38 loc) • 1.61 kB
TypeScript
import { JSXElementConstructor, ReactNode } from 'react';
import { ObservableMap } from 'mobx';
import { GroupPanelMap, TabsCustomized } from './Tabs';
import { TabPaneProps } from './TabPane';
import { TabsPosition } from './enum';
export interface TabsContextValue {
prefixCls?: string | undefined;
defaultActiveKey?: string | undefined;
actuallyDefaultActiveKey?: string | undefined;
propActiveKey?: string | undefined;
keyboard?: boolean | undefined;
hideOnlyGroup?: boolean | undefined;
tabBarPosition?: TabsPosition | undefined;
customizable?: boolean | undefined;
customized?: TabsCustomized | undefined | null;
saveCustomized: (customized: TabsCustomized) => void;
activeKey?: string | undefined;
activeGroupKey?: string | undefined;
changeActiveKey: (activeKey: string, byGroup?: boolean) => void;
groupedPanelsMap: Map<string, GroupPanelMap>;
currentPanelMap: Map<string, TabPaneProps & {
type: string | JSXElementConstructor<any>;
}>;
totalPanelsMap: Map<string, TabPaneProps & {
type: string | JSXElementConstructor<any>;
}>;
validationMap: ObservableMap<string, boolean>;
onTabClick?: ((key: string) => void) | undefined;
children?: ReactNode;
tabDraggable?: boolean | undefined;
tabTitleEditable?: boolean | undefined;
tabCountHideable?: boolean | undefined;
defaultChangeable?: boolean | undefined;
rippleDisabled?: boolean | undefined;
restoreDefault?: boolean | undefined;
}
declare const TabsContext: import("react").Context<TabsContextValue>;
export default TabsContext;