UNPKG

1.53 kBTypeScriptView Raw
1import React from 'react';
2import { IGestureStatus } from 'rc-gesture';
3import { PropsType as BasePropsType } from './PropsType';
4import { DefaultTabBar } from './DefaultTabBar';
5import { Tabs as Component, StateType as BaseStateType } from './Tabs.base';
6export interface PropsType extends BasePropsType {
7 /** prefix class | default: rmc-tabs */
8 prefixCls?: string;
9}
10export declare class StateType extends BaseStateType {
11 contentPos?: string | undefined;
12 isMoving?: boolean | undefined;
13}
14export declare class Tabs extends Component<PropsType, StateType> {
15 static DefaultTabBar: typeof DefaultTabBar;
16 static defaultProps: PropsType;
17 layout: HTMLDivElement;
18 onPan: {
19 onPanStart: (status: IGestureStatus) => void;
20 onPanMove: (status: IGestureStatus) => void;
21 onPanEnd: () => void;
22 setCurrentOffset: (offset: string | number) => string | number;
23 };
24 constructor(props: PropsType);
25 goToTab(index: number, force?: boolean, usePaged?: boolean | undefined, props?: Readonly<{
26 children?: React.ReactNode;
27 }> & Readonly<PropsType>): boolean;
28 tabClickGoToTab(index: number): void;
29 getContentPosByIndex(index: number, isVertical: boolean, useLeft?: boolean): string;
30 onSwipe: (status: IGestureStatus) => void;
31 setContentLayout: (div: HTMLDivElement) => void;
32 renderContent(getSubElements?: (defaultPrefix?: string, allPrefix?: string) => {
33 [key: string]: React.ReactNode;
34 }): JSX.Element;
35 render(): JSX.Element;
36}