13:20 - Quote mit Styling
import React, { Component } from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
export default class Quote extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.text}>{this.props.text}</Text> | |
<Text style={styles.author}>— {this.props.author}</Text> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
paddingHorizontal: 20, | |
height: 300, | |
width: '100%' | |
}, | |
text: { | |
fontSize: 36, | |
fontStyle: 'italic', | |
textAlign: 'center', | |
marginBottom: 10 | |
}, | |
author: { | |
fontSize: 20, | |
textAlign: 'right' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment