Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
4 changes: 2 additions & 2 deletions examples/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'rmc-tabs/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Models, Tabs, DefaultTabBar } from '../src';

class BasicDemo extends React.Component<{}, any> {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-native/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* tslint:disable:no-console */
import { View, ScrollView, Text } from 'react-native';
import { Tabs, Models } from '../../src';
import React from 'react';
import * as React from 'react';

const renderContent = (tab: Models.TabData, index: number) =>
<ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion examples/react-native/scrolltabbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* tslint:disable:no-console */
import { View, ScrollView, Text } from 'react-native';
import { Tabs, Models } from '../../src';
import React from 'react';
import * as React from 'react';

const renderContent = (tab: Models.TabData, index: number) =>
<ScrollView style={{ backgroundColor: '#fff' }}>
Expand Down
4 changes: 2 additions & 2 deletions examples/scroll-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'rmc-tabs/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Tabs, DefaultTabBar } from '../src';

const tabData = [
Expand Down
4 changes: 2 additions & 2 deletions examples/single-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'rmc-tabs/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Models, Tabs } from '../src';

const tabData = [
Expand Down
4 changes: 2 additions & 2 deletions examples/sticky.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'rmc-tabs/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { StickyContainer, Sticky } from 'react-sticky';
import { Tabs, DefaultTabBar } from '../src';

Expand Down
4 changes: 2 additions & 2 deletions examples/vertical.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'rmc-tabs/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Tabs } from '../src';

class BasicDemo extends React.Component<{}, {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
"@types/enzyme": "^2.8.6",
"@types/enzyme-to-json": "^1.5.0",
"@types/jest": "^20.0.7",
"@types/react": "^15.5.0",
"@types/react-dom": "^15.5.0",
"@types/react-native": "^0.46.9",
"@types/react": "^16.0.0",
"@types/react-dom": "^16.0.0",
"@types/react-native": "^0.55.0",
"@types/react-sticky": "^6.0.0",
"jest": "^20.0.4",
"enzyme": "^2.9.1",
Expand Down
4 changes: 2 additions & 2 deletions src/DefaultTabBar.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import * as React from 'react';
import * as RN from 'react-native';
import {
default as RN,
Animated,
Dimensions,
Platform,
Expand Down
2 changes: 1 addition & 1 deletion src/DefaultTabBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Gesture, { IGestureStatus } from 'rc-gesture';
import { Models } from './Models';
import { TabBarPropsType } from './PropsType';
Expand Down
5 changes: 3 additions & 2 deletions src/TabPane.native.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { default as RN, View } from 'react-native';
import * as React from 'react';
import * as RN from 'react-native';
import { View } from 'react-native';

export interface PropsType {
key?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/TabPane.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { getPxStyle, getTransformPropValue } from './util';

export interface PropsType {
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs.base.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { PropsType } from './PropsType';
import { Models } from './Models';

Expand Down
6 changes: 3 additions & 3 deletions src/Tabs.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import * as React from 'react';
import * as RN from 'react-native';
import {
default as RN,
Dimensions,
View,
Animated,
Expand Down Expand Up @@ -31,7 +31,7 @@ export class Tabs extends Component<PropsType, StateType> {
style: {},
} as PropsType;

AnimatedScrollView: ScrollView = Animated.createAnimatedComponent(ScrollView);
AnimatedScrollView: typeof ScrollView = Animated.createAnimatedComponent(ScrollView);
scrollView: { _component: ScrollView };

constructor(props: PropsType) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Gesture, { IGestureStatus } from 'rc-gesture';
import { PropsType as BasePropsType, TabBarPropsType } from './PropsType';
import { TabPane } from './TabPane';
Expand Down
2 changes: 1 addition & 1 deletion tests/Tabs.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { render } from 'enzyme';
import renderToJson from 'enzyme-to-json';
import { Tabs, Models } from '../src';
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"strictNullChecks": true,
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"target": "es6",
"noImplicitAny": true,
"noUnusedLocals": true
"noUnusedLocals": true,
"skipLibCheck": true
}
}