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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
npm-debug.log
package-lock.json
node_modules/
12 changes: 4 additions & 8 deletions Navigation/NavigationBar.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
'use strict';
import React from 'react-native'
import React from 'react'

var {
Navigator,
import {
View,
Text,
StyleSheet,
TouchableHighlight,
TouchableOpacity,
Text,
Animated,
Easing,
BackAndroid,
Platform,
} = React;
} from 'react-native';

import NavigationButton, * as NavButton from './NavigationButton'
import NavStyles from './styles';
Expand Down
9 changes: 4 additions & 5 deletions Navigation/NavigationButton.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
'use strict'

import React from 'react-native'
import React from 'react'

var {
import {
View,
Text,
Image,
TouchableOpacity,
TouchableHighlight,
TouchableHighlight,
StyleSheet
} = React;
} from 'react-natvie';

export const BUTTON_TEXT_ONLY = 1;
export const BUTTON_IMAGE_ONLY = 2;
Expand Down
28 changes: 13 additions & 15 deletions Navigation/NavigationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@

'use strict';

import React from 'react-native'

import NavigationBar from './NavigationBar';
import NavStyles from './styles';

let {
StyleSheet,
import React from 'react'
import PropTypes from 'prop-types';
import {
Navigator,
StatusBarIOS,
View,
Platform,
StatusBar
} = React;
} from 'react-native';

import NavigationBar from './NavigationBar';
import NavStyles from './styles';

export default class NavigationController extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -306,16 +304,16 @@ NavigationController.propTypes={
/**
* 初始路由
*/
initalRoute: React.PropTypes.object, // {title, component, sceneConfig}
initalRoute: PropTypes.object, // {title, component, sceneConfig}

/**
* 导航栏样式
*/
navbarStyle: View.propTypes.style,
navbarStyle: PropTypes.object,
/**
* 内容页样式
*/
itemWrapperStyle: View.propTypes.style,
itemWrapperStyle: PropTypes.object,
/**
* 导航栏标题样式
*/
Expand All @@ -324,15 +322,15 @@ NavigationController.propTypes={
/**
* 右边按钮, component
*/
rightBarItem: React.PropTypes.element,
rightBarItem: PropTypes.node,
/**
* 左边按钮, component
*/
leftBarItem: React.PropTypes.element,
leftBarItem: PropTypes.node,
/**
* 中间标题, component
*/
titleBarItem: React.PropTypes.element,
titleBarItem: PropTypes.node,


};
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
"react-native"
],
"author": "yiyangest",
"license": "MIT"
"license": "MIT",
"dependencies": {
"prop-types": "^15.7.2"
}
}