Initial definitions for react-native 0.14

This commit is contained in:
bgrieder
2015-11-06 22:01:15 +01:00
parent 35989a3ab4
commit efce0c25ec
3 changed files with 1329 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
/*
The content of index.io.js could be something like
'use strict';
import { AppRegistry } from 'react-native'
import Welcome from './gen/Welcome'
AppRegistry.registerComponent('MopNative', () => Welcome);
*/
///<reference path="../react-native/react-native.d.ts" />
import React from 'react-native'
const { StyleSheet, Text, View } = React
var styles = StyleSheet.create(
{
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
}
)
class Welcome extends React.Component<any,any> {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
</Text>
</View>
)
}
}
export default Welcome
@@ -0,0 +1 @@
--target es6 --noImplicitAny --jsx react
+1260
View File
File diff suppressed because it is too large Load Diff