Skip to content

Instantly share code, notes, and snippets.

@behrends
Created July 4, 2018 11:23
Show Gist options
  • Save behrends/5043600b92a0e0feced3a1036331e03b to your computer and use it in GitHub Desktop.
Save behrends/5043600b92a0e0feced3a1036331e03b to your computer and use it in GitHub Desktop.
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}>&mdash; {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