Created
June 26, 2017 19:37
-
-
Save Louiefigz/20b382decd19c7680b36e248412a55df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { ScrollView, Text, StyleSheet, View } from 'react-native'; | |
| export default class App extends React.Component { | |
| render() { | |
| return ( | |
| <View style={styles.background}> | |
| <ScrollView > | |
| {this.props.text.map((item)=> | |
| <Text style={styles.font}>{item}</Text> | |
| )} | |
| </ScrollView> | |
| </View> | |
| ); | |
| } | |
| } | |
| const styles = StyleSheet.create({ | |
| background:{ | |
| marginTop: 100, | |
| marginLeft: 100 | |
| }, | |
| font:{ | |
| fontSize: 30, | |
| } | |
| }) | |
| App.defaultProps = { | |
| text: ['Burger King', 'McDonalds', 'Red Lobster', 'Dennys', 'Wendys', 'White Castle', 'popeyes'] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment