UNPKG

1.05 kBTypeScriptView Raw
1import * as React from 'react';
2import type { TabsProps as RcTabsProps } from 'rc-tabs';
3import type { GetIndicatorSize } from 'rc-tabs/lib/hooks/useIndicator';
4import type { SizeType } from '../config-provider/SizeContext';
5import TabPane from './TabPane';
6import type { TabPaneProps } from './TabPane';
7export type TabsType = 'line' | 'card' | 'editable-card';
8export type TabsPosition = 'top' | 'right' | 'bottom' | 'left';
9export type { TabPaneProps };
10export interface TabsProps extends Omit<RcTabsProps, 'editable'> {
11 rootClassName?: string;
12 type?: TabsType;
13 size?: SizeType;
14 hideAdd?: boolean;
15 centered?: boolean;
16 addIcon?: React.ReactNode;
17 removeIcon?: React.ReactNode;
18 onEdit?: (e: React.MouseEvent | React.KeyboardEvent | string, action: 'add' | 'remove') => void;
19 children?: React.ReactNode;
20 /** @deprecated Please use `indicator={{ size: ... }}` instead */
21 indicatorSize?: GetIndicatorSize;
22}
23declare const Tabs: React.FC<TabsProps> & {
24 TabPane: typeof TabPane;
25};
26export default Tabs;