Created
December 15, 2017 21:56
-
-
Save rbhatia46/f78a3c23361ae044e3ce689c64a5e0f8 to your computer and use it in GitHub Desktop.
Reusable Card 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,Text } from 'react-native'; | |
| const Card = (props) => { | |
| return ( | |
| <View style={styles.containerStyle}> | |
| {props.children} | |
| </View> | |
| ); | |
| } | |
| const styles = { | |
| containerStyle: { | |
| borderWidth: 1, | |
| borderRadius: 2, | |
| borderColor: '#ddd', | |
| borderBottomWidth: 0, | |
| shadowColor: '#000', | |
| shadowOffset: { width: 0, height: 2 }, | |
| shadowOpacity: 0.1, | |
| shadowRadius: 2, | |
| elevation: 1, | |
| marginLeft: 5, | |
| marginRight: 5, | |
| marginTop: 10 | |
| } | |
| }; | |
| export default Card; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment