Bump RN to 0.46 +deps

- Fix npm test (jest)
- Remove material-kit for now
This commit is contained in:
nikolark committed 2017-07-17 22:16:14 +02:00
1 parent 4f63ddf3e1
commit b6346caabd
3 files changed
+1008 -638

No files matched your search

+13 -10
View File
@@ -7,19 +7,22 @@
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-native-material-kit": "^0.4.1",
"react-redux": "^5.0.2",
"redux": "^3.6.0"
"prop-types": "^15.5.10",
"react": "16.0.0-alpha.12",
"react-native": "0.46.3",
"react-redux": "^5.0.5",
"redux": "^3.7.2"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "~15.4.0-rc.4"
"babel-jest": "20.0.3",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
"preset": "react-native",
"transformIgnorePatterns": [
"node_modules/(?!react-native|tcomb-form-native|apsl-react-native-button,react-native-device-info|react-clone-referenced-element)"
]
}
}
+20 -23
View File
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
import { MKButton, MKColor, MKTextField } from 'react-native-material-kit';
import {Button, Image, StyleSheet, Text, TextInput, View} from 'react-native';
import { loginStart } from "../../actions";
@@ -12,9 +11,7 @@ export default class Login extends Component {
}
}
componentWillReceiveProps(nextProps) {
console.log("IN Login.componentWillReceiveProps");
console.log(nextProps);
if(this.state.loggedIn != nextProps.loggedIn) {
if(this.state.loggedIn !== nextProps.loggedIn) {
this.setState({
loggedIn: nextProps.loggedIn
})
@@ -26,32 +23,29 @@ export default class Login extends Component {
};
return (
<View style={styles.container}>
<Text>Chateau Neuf</Text>
<Text>The Norwegian Student Society</Text>
<Text style={styles.text}>The Norwegian Student Society</Text>
<Text style={styles.text}>Chateau Neuf</Text>
<Image source={pic} style={{width: 200, height: 150, marginBottom: 40}} resizeMode='contain' />
<MKTextField
<TextInput
placeholder="Email"
style={styles.input}
/>
<MKTextField
<TextInput
placeholder="Password"
style={styles.input}
/>
<MKButton
backgroundColor={MKColor.Blue}
shadowRadius={2}
shadowOpacity={.7}
shadowColor="black"
onPress={this.onLoginPress}
style={{marginTop: 20}}
>
<Text pointerEvents="none" style={styles.button}>Log in</Text>
</MKButton>
<View style={styles.button}>
<Button
title="Log in"
onPress={this.onLoginPress}
/>
</View>
<Text style={{paddingTop: 10}}>{this.loginState()}</Text>
</View>
);
}
onLoginPress = () => {
console.log("YO from onLoginPress");
this.props.dispatch(loginStart())
};
@@ -72,13 +66,16 @@ const styles = StyleSheet.create({
},
input: {
width: 240,
height: 50,
fontSize: 20,
height: 52,
},
button: {
fontWeight: 'bold',
marginTop: 20,
padding: 10,
width: 240,
textAlign: 'center',
color: 'white',
},
text: {
fontSize: 18,
fontWeight: 'bold'
}
});
+975 -605
View File
File diff suppressed because it is too large. Load diff