Created
December 15, 2017 21:56
-
-
Save rbhatia46/1bd7b19823bc012eaf3bcd5933c99873 to your computer and use it in GitHub Desktop.
Reusable Card Section Component for React Native
This file contains hidden or 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
| import React from 'react'; | |
| import { View } from 'react-native'; | |
| const CardSection = (props) => { | |
| return( | |
| <View style={styles.containerStyle}> | |
| {props.children} | |
| </View> | |
| ); | |
| } | |
| const styles = { | |
| containerStyle: { | |
| borderBottomWidth: 1, | |
| padding: 5, | |
| backgroundColor: '#fff', | |
| justifyContent: 'flex-start', | |
| flexDirection: 'row', | |
| borderColor: '#ddd', | |
| position: 'relative' | |
| } | |
| }; | |
| export default CardSection; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment