Last active
March 21, 2023 12:53
-
-
Save roshangm1/18713918970ca7c76d874f62b8e88fc0 to your computer and use it in GitHub Desktop.
Stateless component
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
import React from 'react'; | |
import { | |
Dimensions, | |
StyleSheet, | |
Text, | |
View, | |
} from 'react-native'; | |
const { width } = Dimensions.get('window'); | |
const Card = props => { | |
return ( | |
<View style={[styles.cardWrapper, props.style]}> | |
{props.children} | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
cardWrapper: { | |
height: 50, | |
width: width - 20, | |
marginTop: 20, | |
marginLeft: 10, | |
borderRadius:4, | |
borderWidth: 1, | |
borderColor: '#d6d7da', | |
}, | |
}) | |
export { Card }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment