|
|
@ -1,5 +1,4 @@
|
|
|
|
import React from 'react';
|
|
|
|
import React, { cloneElement } from 'react';
|
|
|
|
import { cloneElement } from 'react';
|
|
|
|
|
|
|
|
import { findDOMNode } from 'react-dom';
|
|
|
|
import { findDOMNode } from 'react-dom';
|
|
|
|
import RcTabs, { TabPane } from 'rc-tabs';
|
|
|
|
import RcTabs, { TabPane } from 'rc-tabs';
|
|
|
|
import ScrollableInkTabBar from 'rc-tabs/lib/ScrollableInkTabBar';
|
|
|
|
import ScrollableInkTabBar from 'rc-tabs/lib/ScrollableInkTabBar';
|
|
|
@ -18,6 +17,8 @@ export interface TabsProps {
|
|
|
|
hideAdd?: boolean;
|
|
|
|
hideAdd?: boolean;
|
|
|
|
onChange?: (activeKey: string) => void;
|
|
|
|
onChange?: (activeKey: string) => void;
|
|
|
|
onTabClick?: Function;
|
|
|
|
onTabClick?: Function;
|
|
|
|
|
|
|
|
onPrevClick?: (e) => void;
|
|
|
|
|
|
|
|
onNextClick?: (e) => void;
|
|
|
|
tabBarExtraContent?: React.ReactNode | null;
|
|
|
|
tabBarExtraContent?: React.ReactNode | null;
|
|
|
|
tabBarStyle?: React.CSSProperties;
|
|
|
|
tabBarStyle?: React.CSSProperties;
|
|
|
|
type?: TabsType;
|
|
|
|
type?: TabsType;
|
|
|
@ -95,6 +96,8 @@ export default class Tabs extends React.Component<TabsProps, any> {
|
|
|
|
tabBarStyle,
|
|
|
|
tabBarStyle,
|
|
|
|
hideAdd,
|
|
|
|
hideAdd,
|
|
|
|
onTabClick,
|
|
|
|
onTabClick,
|
|
|
|
|
|
|
|
onPrevClick,
|
|
|
|
|
|
|
|
onNextClick,
|
|
|
|
animated,
|
|
|
|
animated,
|
|
|
|
} = this.props;
|
|
|
|
} = this.props;
|
|
|
|
warning(
|
|
|
|
warning(
|
|
|
@ -152,6 +155,8 @@ export default class Tabs extends React.Component<TabsProps, any> {
|
|
|
|
<ScrollableInkTabBar
|
|
|
|
<ScrollableInkTabBar
|
|
|
|
extraContent={tabBarExtraContent}
|
|
|
|
extraContent={tabBarExtraContent}
|
|
|
|
onTabClick={onTabClick}
|
|
|
|
onTabClick={onTabClick}
|
|
|
|
|
|
|
|
onPrevClick={onPrevClick}
|
|
|
|
|
|
|
|
onNextClick={onNextClick}
|
|
|
|
style={tabBarStyle}
|
|
|
|
style={tabBarStyle}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
);
|
|
|
|