Skip to content

Instantly share code, notes, and snippets.

@behrends

behrends/Quote.js

Created Jul 4, 2018
Embed
What would you like to do?
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