mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Initial definitions for react-native 0.14
This commit is contained in:
@@ -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
|
||||
Vendored
+1260
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user