Last active
October 12, 2017 15:44
-
-
Save Makazone/2f1764fb1b230a2bbbfcc08ea3b88ba1 to your computer and use it in GitHub Desktop.
Create a boxed shadow around an image
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
_maybeRenderImage = (imageUri) => { | |
return ( | |
<View | |
style={{ | |
marginTop: 30, | |
width: 250, | |
borderRadius: 3, | |
elevation: 2, | |
shadowColor: 'rgba(0,0,0,1)', | |
shadowOpacity: 0.2, | |
shadowOffset: { width: 4, height: 4 }, | |
shadowRadius: 5 | |
}} | |
> | |
<View | |
style={{ | |
borderTopRightRadius: 3, | |
borderTopLeftRadius: 3, | |
overflow: 'hidden' | |
}} | |
> | |
<Image source={{ uri: imageUri }} style={{ width: 250, height: 250 }} /> | |
</View> | |
</View> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment