1 | import { CSSProperties, FunctionComponent, JSXElementConstructor, Key, MouseEvent, MouseEventHandler, ReactNode } from 'react';
|
2 | import { TabsPosition, TabsType } from './enum';
|
3 | import TabPane, { TabPaneProps } from './TabPane';
|
4 | import TabGroup, { TabGroupProps } from './TabGroup';
|
5 | import { Size } from '../_util/enum';
|
6 | export declare type Animated = {
|
7 | inkBar: boolean;
|
8 | tabPane: boolean;
|
9 | };
|
10 | export interface TabsCustomized {
|
11 | defaultActiveKey?: string;
|
12 | panes: {
|
13 | [key: string]: TabPaneProps;
|
14 | };
|
15 | }
|
16 | export interface TabsProps<T = string> {
|
17 | activeKey?: string;
|
18 | defaultActiveKey?: string;
|
19 | hideAdd?: boolean;
|
20 | hideOnlyGroup?: boolean;
|
21 | onChange?: (activeKey: T) => void;
|
22 | onTabClick?: (key: string) => void;
|
23 | onPrevClick?: MouseEventHandler<any>;
|
24 | onNextClick?: MouseEventHandler<any>;
|
25 | tabBarExtraContent?: ReactNode | null;
|
26 | tabBarStyle?: CSSProperties;
|
27 | inkBarStyle?: CSSProperties;
|
28 | tabBarGutter?: number;
|
29 | type?: TabsType;
|
30 | tabPosition?: TabsPosition;
|
31 | onEdit?: (targetKey: Key | MouseEvent<HTMLElement>, action: 'add' | 'remove') => void;
|
32 | size?: Size;
|
33 | style?: CSSProperties;
|
34 | prefixCls?: string;
|
35 | className?: string;
|
36 | animated?: boolean | Animated;
|
37 | closeShortcut?: boolean;
|
38 | keyboard?: boolean;
|
39 | destroyInactiveTabPane?: boolean;
|
40 | children?: ReactNode;
|
41 | customizable?: boolean;
|
42 | customizedCode?: string;
|
43 | }
|
44 | export declare type GroupPanelMap = {
|
45 | group: TabGroupProps;
|
46 | panelsMap: Map<string, TabPaneProps & {
|
47 | type: string | JSXElementConstructor<any>;
|
48 | }>;
|
49 | lastActiveKey?: string;
|
50 | };
|
51 | declare const Tabs: FunctionComponent<TabsProps>;
|
52 | export declare type ForwardTabsType = typeof Tabs & {
|
53 | TabPane: typeof TabPane;
|
54 | TabGroup: typeof TabGroup;
|
55 | };
|
56 | declare const _default: ForwardTabsType;
|
57 | export default _default;
|