UNPKG

1.42 kBTypeScriptView Raw
1import * as React from 'react';
2import type { AnimatedConfig, EditableConfig, OnTabScroll, RenderTabBar, Tab, TabBarExtraContent, TabPosition, TabsLocale } from './interface';
3import type { GetIndicatorSize } from './hooks/useIndicator';
4export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'children'> {
5 prefixCls?: string;
6 className?: string;
7 style?: React.CSSProperties;
8 id?: string;
9 items?: Tab[];
10 activeKey?: string;
11 defaultActiveKey?: string;
12 direction?: 'ltr' | 'rtl';
13 animated?: boolean | AnimatedConfig;
14 renderTabBar?: RenderTabBar;
15 tabBarExtraContent?: TabBarExtraContent;
16 tabBarGutter?: number;
17 tabBarStyle?: React.CSSProperties;
18 tabPosition?: TabPosition;
19 destroyInactiveTabPane?: boolean;
20 onChange?: (activeKey: string) => void;
21 onTabClick?: (activeKey: string, e: React.KeyboardEvent | React.MouseEvent) => void;
22 onTabScroll?: OnTabScroll;
23 editable?: EditableConfig;
24 getPopupContainer?: (node: HTMLElement) => HTMLElement;
25 locale?: TabsLocale;
26 moreIcon?: React.ReactNode;
27 /** @private Internal usage. Not promise will rename in future */
28 moreTransitionName?: string;
29 popupClassName?: string;
30 indicatorSize?: GetIndicatorSize;
31}
32declare const ForwardTabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
33export default ForwardTabs;