UNPKG

1.44 kBTypeScriptView Raw
1import * as React from 'react';
2import type { GetIndicatorSize } from './hooks/useIndicator';
3import type { AnimatedConfig, EditableConfig, MoreProps, OnTabScroll, RenderTabBar, Tab, TabBarExtraContent, TabPosition, TabsLocale } from './interface';
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 more?: MoreProps;
27 /** @private Internal usage. Not promise will rename in future */
28 popupClassName?: string;
29 indicator?: {
30 size?: GetIndicatorSize;
31 align?: 'start' | 'center' | 'end';
32 };
33}
34declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
35export default Tabs;