Initial commit from boilerplate

This commit is contained in:
2017-02-01 22:09:06 -07:00
commit ff17b2a0d3
45 changed files with 2219 additions and 0 deletions

36
app/components/counter.js Normal file
View File

@@ -0,0 +1,36 @@
import React, {Component} from 'react';
import {StyleSheet, View, Text, TouchableOpacity} from 'react-native';
const styles = StyleSheet.create({
button: {
width: 100,
height: 30,
padding: 10,
backgroundColor: 'lightgray',
alignItems: 'center',
justifyContent: 'center',
margin: 3
}
});
export default class Counter extends Component {
constructor(props) {
super(props);
}
render() {
const { counter, increment, decrement } = this.props;
return (
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>{counter}</Text>
<TouchableOpacity onPress={increment} style={styles.button}>
<Text>up</Text>
</TouchableOpacity>
<TouchableOpacity onPress={decrement} style={styles.button}>
<Text>down</Text>
</TouchableOpacity>
</View>
);
}
}