mirror of
https://github.com/status-im/react-native-languages.git
synced 2025-01-15 10:45:51 +00:00
44 lines
1005 B
JavaScript
44 lines
1005 B
JavaScript
// @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}>
|
|
language: {ReactNativeLanguages.language}
|
|
</Text>
|
|
<Text style={styles.line}>
|
|
languages: {JSON.stringify(ReactNativeLanguages.languages)}
|
|
</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
|
|
);
|