Last active
April 25, 2018 16:12
-
-
Save mcavaliere/a519fafb2425edcd4b5e23562c987bb7 to your computer and use it in GitHub Desktop.
React Native Design Systems: SimpleComponentWithoutLiterals
This file contains 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
let Style = StyleSheet.create({ | |
container: { borderRadius: 5 }, | |
heading: { backgroundColor: 'beige', padding: 5 }, | |
headingText: { color: 'black', fontSize: 16, fontWeight: 'bold' }, | |
body: { padding: 5 }, | |
bodyText: { color: 'black', fontSize: 12 } | |
}) | |
class SimpleComponentWithoutLiterals extends Component { | |
render() { | |
return ( | |
<View style={ Styles.container }> | |
<View style={ Styles.heading }> | |
<Text style={ Styles.headingText }>{ this.props.title }</Text> | |
</View> | |
<View style={ Styles.body }> | |
<Text style={ Styles.bodyText }>{ this.props.bodyText }</Text> | |
</View> | |
</View> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment