Skip to content

Instantly share code, notes, and snippets.

@rbhatia46
Created December 15, 2017 21:56
Show Gist options
  • Select an option

  • Save rbhatia46/f78a3c23361ae044e3ce689c64a5e0f8 to your computer and use it in GitHub Desktop.

Select an option

Save rbhatia46/f78a3c23361ae044e3ce689c64a5e0f8 to your computer and use it in GitHub Desktop.
Reusable Card Component for React Native
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