Skip to content

Instantly share code, notes, and snippets.

@mcavaliere
Last active April 25, 2018 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcavaliere/45b557afcdd2335f3c766969a9cd1179 to your computer and use it in GitHub Desktop.
Save mcavaliere/45b557afcdd2335f3c766969a9cd1179 to your computer and use it in GitHub Desktop.
React Native Design Systems: A Cleaner Component
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import Styles from './Card.style';
class Card extends Component {
render() {
return (
<View style={ Styles.container }>
<View style={ Styles.titleContainer }>
<Text>{ this.props.title }</Text>
</View>
<View style={ Styles.contentContainer }>
<Text>{ this.props.body }</Text>
</View>
</View>
);
}
}
export default Card;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment