2017-08-01 18:44:14 +02:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { AppRegistry, StyleSheet, Text, View } from 'react-native';
|
|
|
|
import ReactNativeLanguages from 'react-native-languages';
|
|
|
|
|
|
|
|
export default class ReactNativeLanguagesExample extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<Text style={styles.title}>react-native-languages demo</Text>
|
|
|
|
<Text style={styles.line}>
|
2017-08-01 19:06:54 +02:00
|
|
|
language: {ReactNativeLanguages.language}
|
2017-08-01 18:44:14 +02:00
|
|
|
</Text>
|
|
|
|
<Text style={styles.line}>
|
2017-08-01 19:06:54 +02:00
|
|
|
languages: {JSON.stringify(ReactNativeLanguages.languages)}
|
2017-08-01 18:44:14 +02:00
|
|
|
</Text>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: '#F5FCFF',
|
|
|
|
paddingHorizontal: 10,
|
|
|
|
paddingVertical: 30
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
fontSize: 20,
|
|
|
|
marginBottom: 10
|
|
|
|
},
|
|
|
|
line: {
|
|
|
|
color: '#333333',
|
|
|
|
marginBottom: 5
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
AppRegistry.registerComponent(
|
|
|
|
'ReactNativeLanguagesExample',
|
|
|
|
() => ReactNativeLanguagesExample
|
|
|
|
);
|